Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
522 changes: 520 additions & 2 deletions apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export function usePromptActions({
const copy = t.desktop

const appendSessionTextMessage = useCallback(
(sessionId: string, role: ChatMessage['role'], text: string) => {
(sessionId: string, role: ChatMessage['role'], text: string, storedSessionId?: string | null) => {
// Strip ANSI: slash-command output from the backend worker carries SGR
// color codes (e.g. "Unknown command" in red). The ESC byte is invisible
// in the chat panel, so without this the `[1;31m…[0m` payload leaks as
Expand All @@ -244,7 +244,7 @@ export function usePromptActions({
}
]
}),
selectedStoredSessionIdRef.current
storedSessionId ?? selectedStoredSessionIdRef.current
)
},
[selectedStoredSessionIdRef, updateSessionState]
Expand Down Expand Up @@ -478,8 +478,10 @@ export function usePromptActions({
refreshSessions,
requestGateway,
resumeStoredSession,
selectedStoredSessionIdRef,
startFreshSessionDraft,
submitPromptText
submitPromptText,
updateSessionState
})

const submitText = useCallback(
Expand Down
Loading
Loading