Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
chore(desktop-ui): r5-l3 remove unused send draft helper
Josué7e895b4001e9
diff --git a/desktop-app/ui/src/lib/__tests__/composerDraftStore.test.ts b/desktop-app/ui/src/lib/__tests__/composerDraftStore.test.tsindex 5e9b0dcdd..0a2ef3fd6 100644--- a/desktop-app/ui/src/lib/__tests__/composerDraftStore.test.ts+++ b/desktop-app/ui/src/lib/__tests__/composerDraftStore.test.ts@@ -1,7 +1,6 @@import { afterEach, describe, expect, it, vi } from 'vitest'import {clearComposerDraft,- clearComposerDraftAfterSend,getComposerDraft,resetComposerDraftStore,setComposerDraft,@@ -85,16 +84,6 @@ describe('composerDraftStore', () => {expect(getComposerDraft('chat-1')).toBe('')})- it('clearComposerDraftAfterSend clears both the no-chat bucket and the target chat', () => {- setComposerDraft(null, 'typed before a chat existed')- setComposerDraft('chat-1', 'leftover')-- clearComposerDraftAfterSend('chat-1')-- expect(getComposerDraft(null)).toBe('')- expect(getComposerDraft('chat-1')).toBe('')- })-it('isolates no-chat drafts by agent while preserving the legacy unscoped bucket', () => {setComposerDraft(null, 'agent-a draft', 'agent-a')setComposerDraft(null, 'agent-b draft', 'agent-b')@@ -104,7 +93,7 @@ describe('composerDraftStore', () => {expect(getComposerDraft(null, 'agent-b')).toBe('agent-b draft')expect(getComposerDraft(null)).toBe('legacy draft')- clearComposerDraftAfterSend(null, 'agent-a')+ clearComposerDraft(null, 'agent-a')expect(getComposerDraft(null, 'agent-a')).toBe('')expect(getComposerDraft(null, 'agent-b')).toBe('agent-b draft')expect(getComposerDraft(null)).toBe('legacy draft')diff --git a/desktop-app/ui/src/lib/composerDraftStore.ts b/desktop-app/ui/src/lib/composerDraftStore.tsindex a75b38c07..07cb51354 100644--- a/desktop-app/ui/src/lib/composerDraftStore.ts+++ b/desktop-app/ui/src/lib/composerDraftStore.ts@@ -49,12 +49,6 @@ export function clearComposerDraft(chatId: string | null, agentRef?: string): vosetComposerDraft(chatId, '', agentRef)}-/** Clears the draft for a chat and the "no chat yet" bucket (used on send). */-export function clearComposerDraftAfterSend(chatId: string | null, agentRef?: string): void {- clearComposerDraft(null, agentRef)- if (chatId) clearComposerDraft(chatId)-}-/** Drop drafts on logout or principal/team change and notify mounted composers. */export function clearAllComposerDrafts(): void {for (const key of [...drafts.keys()]) {