feat(chat): persist more composer input history with global or session scope; recallable with up/down arrow keys (#3035)
* feat(chat): persist input history * feat(settings): configure input history scope * fix(web): keep input history validation packaged * fix(chat): preserve input history across tabs * fix(settings): restore prompt history limit * fix(settings): keep history deletion warning visible * fix(i18n): restore Turkish Git empty state translations --------- Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
Bohdan Triapitsyn
parent
29480383cc
commit
1d6b15bc04
@@ -10,6 +10,7 @@ import { getDirectoryState } from '@/sync/sync-refs';
|
||||
import { useDirectorySync } from '@/sync/sync-context';
|
||||
import { getRuntimeKey } from '@/lib/runtime-switch';
|
||||
import { useDirectoryStore } from '@/stores/useDirectoryStore';
|
||||
import { createInputHistorySubmission } from '@/stores/useInputHistoryStore';
|
||||
|
||||
type SessionStatusType = 'idle' | 'busy' | 'retry';
|
||||
|
||||
@@ -86,6 +87,7 @@ export const buildQueuedAutoSendPayload = (queue: QueuedMessage[]) => {
|
||||
// file mentions resolved, and the context it was queued with following it.
|
||||
return {
|
||||
queuedMessageId: queued.id,
|
||||
historySubmissions: [createInputHistorySubmission(queued.content, queued.attachments ?? [])],
|
||||
primaryText: queued.text,
|
||||
primaryAttachments: queued.attachments ?? [],
|
||||
agentMentionName: queued.agentMention,
|
||||
@@ -116,9 +118,12 @@ export const sendQueuedAutoSendPayload = (
|
||||
payload.agentMentionName,
|
||||
payload.additionalParts.length > 0 ? payload.additionalParts : undefined,
|
||||
resolved.variant,
|
||||
'normal',
|
||||
{ target },
|
||||
);
|
||||
'normal',
|
||||
{
|
||||
target,
|
||||
historySubmissions: payload.historySubmissions,
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
const resolveSessionSendConfig = (sessionId: string) => {
|
||||
|
||||
Reference in New Issue
Block a user