akanjs 3.0.0-alpha.42 → 3.0.0-alpha.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dictionary/base.dictionary.ts +13 -0
- package/local/apps/serverLifecycle/serverLifecycle-local.db-shm +0 -0
- package/local/apps/serverLifecycle/serverLifecycle-local_solid.db-shm +0 -0
- package/package.json +1 -1
- package/service/agent.service.ts +19 -1
- package/store/agent/AgentPrompts.ts +14 -3
- package/types/dictionary/base.dictionary.d.ts +1 -1
- package/types/dictionary/dictionary.d.ts +8 -8
- package/types/service/agent.service.d.ts +8 -0
- package/types/store/agent/AgentPrompts.d.ts +1 -1
- package/types/ui/Agent/Bubble.d.ts +8 -2
- package/types/ui/Agent/Chat.d.ts +9 -7
- package/types/ui/Agent/Composer.d.ts +23 -0
- package/types/ui/Agent/Launcher.d.ts +16 -0
- package/types/ui/Agent/Menu.d.ts +12 -7
- package/types/ui/Agent/Zone.d.ts +5 -3
- package/types/ui/Agent/agentSessionOf.d.ts +18 -0
- package/types/ui/Agent/attachment.d.ts +11 -0
- package/types/ui/Agent/index.d.ts +1 -1
- package/types/ui/Agent/sessionHistory.d.ts +4 -2
- package/types/ui/Agent/useChatAttachments.d.ts +24 -0
- package/types/ui/Agent/useChatVoice.d.ts +30 -0
- package/types/ui/Agent/useDraftRecall.d.ts +14 -0
- package/types/ui/Agent/useSlashMenu.d.ts +24 -0
- package/types/ui/Agent/voice.d.ts +5 -0
- package/types/vendor/use-agentic/AgentSession.d.ts +3 -2
- package/types/vendor/use-agentic/Transcript.d.ts +18 -0
- package/types/vendor/use-agentic/index.d.ts +1 -0
- package/ui/Agent/Bubble.tsx +48 -27
- package/ui/Agent/Chat.tsx +210 -269
- package/ui/Agent/Composer.tsx +77 -0
- package/ui/Agent/Launcher.tsx +57 -0
- package/ui/Agent/Menu.tsx +32 -38
- package/ui/Agent/Zone.tsx +41 -13
- package/ui/Agent/agentSessionOf.ts +41 -0
- package/ui/Agent/attachment.ts +20 -0
- package/ui/Agent/sessionHistory.ts +6 -3
- package/ui/Agent/useChatAttachments.ts +84 -0
- package/ui/Agent/useChatVoice.ts +129 -0
- package/ui/Agent/useDraftRecall.ts +42 -0
- package/ui/Agent/useSlashMenu.ts +58 -0
- package/ui/Agent/voice.ts +9 -0
- package/vendor/use-agentic/AgentSession.ts +28 -12
- package/vendor/use-agentic/Transcript.ts +50 -0
- package/vendor/use-agentic/WIRE.md +7 -0
- package/vendor/use-agentic/index.ts +1 -0
|
@@ -60,6 +60,19 @@ export const baseDictionary = serviceDictionary(["en", "ko"])
|
|
|
60
60
|
agentAttachRemove: ["Remove attachment", "첨부 제거"],
|
|
61
61
|
agentAttachTooLarge: ["{name} is too large to attach.", "{name}은(는) 용량이 너무 커서 첨부할 수 없습니다."],
|
|
62
62
|
agentAttachUnsupported: ["{name} cannot be attached here.", "{name}은(는) 여기에 첨부할 수 없습니다."],
|
|
63
|
+
agentAttachDuplicate: ["{name} is already attached.", "{name}은(는) 이미 첨부되어 있습니다."],
|
|
64
|
+
agentAttachTooMany: [
|
|
65
|
+
"One message can carry {count} files at most.",
|
|
66
|
+
"한 메시지에는 파일을 최대 {count}개까지 첨부할 수 있습니다.",
|
|
67
|
+
],
|
|
68
|
+
agentAttachTooMuch: [
|
|
69
|
+
"{name} would make this message too large to send.",
|
|
70
|
+
"{name}을(를) 더하면 메시지가 너무 커서 보낼 수 없습니다.",
|
|
71
|
+
],
|
|
72
|
+
agentAnswerNeeded: ["Type an answer to the question above.", "위 질문에 대한 답을 입력하세요."],
|
|
73
|
+
agentToolDone: ["Done", "완료"],
|
|
74
|
+
agentToolFailed: ["Failed", "실패"],
|
|
75
|
+
agentToolRunning: ["Running", "실행 중"],
|
|
63
76
|
agentContinue: ["This is taking a while. Keep going?", "시간이 걸리고 있습니다. 계속할까요?"],
|
|
64
77
|
agentKeepGoing: ["Keep going", "계속하기"],
|
|
65
78
|
agentCmdNew: ["Start a new conversation", "새 대화 시작"],
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/service/agent.service.ts
CHANGED
|
@@ -12,11 +12,29 @@ export class AgentService extends serve("agent" as const, ({ plug }) => ({
|
|
|
12
12
|
llm: plug(LlmAdaptorRole),
|
|
13
13
|
})) {
|
|
14
14
|
async runTurn(request: LlmTurnRequest, onDelta?: (delta: string) => void) {
|
|
15
|
-
const
|
|
15
|
+
const prepared = AgentService.readable(AgentService.explained(request), this.llm.accepts);
|
|
16
|
+
const answer = await this.llm.chat(prepared, onDelta);
|
|
16
17
|
if (!answer) throw new Err("agent.error.llmUnavailable");
|
|
17
18
|
return { text: answer.text ?? "", toolCalls: answer.toolCalls ?? [], stop: answer.stop };
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Folds a failed turn into the message text. `error` is a field only this wire has, so a provider mapping reads
|
|
23
|
+
* `text` and drops it — leaving the model an assistant turn that says nothing, with no hint that the attempt
|
|
24
|
+
* failed, and every reason to make the same one again. Done here rather than per adaptor because every adaptor
|
|
25
|
+
* would otherwise have to remember, and forgetting is silent.
|
|
26
|
+
*/
|
|
27
|
+
static explained(request: LlmTurnRequest): LlmTurnRequest {
|
|
28
|
+
if (!request.messages.some((message) => message.error)) return request;
|
|
29
|
+
return { ...request, messages: request.messages.map((message) => AgentService.explainedMessage(message)) };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
private static explainedMessage(message: AgentWireMessage): AgentWireMessage {
|
|
33
|
+
const { error, ...rest } = message;
|
|
34
|
+
if (!error) return message;
|
|
35
|
+
return { ...rest, text: [message.text, `[The turn failed: ${error}]`].filter(Boolean).join("\n\n") };
|
|
36
|
+
}
|
|
37
|
+
|
|
20
38
|
/**
|
|
21
39
|
* Replaces every attachment the provider cannot read with a note naming it, so no adaptor has to think about
|
|
22
40
|
* attachments it does not support and none can lose one quietly. The model has to be *told*, not merely spared:
|
|
@@ -49,11 +49,22 @@ export class AgentPrompts {
|
|
|
49
49
|
return this.list().find((prompt) => prompt.name === name) ?? null;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
/** `/name arg1
|
|
52
|
+
/** `/name arg1 "an arg with spaces"` — positional because a prompt's arguments are flat strings by protocol. */
|
|
53
53
|
static parseCommand(draft: string): { name: string; args: string[] } | null {
|
|
54
|
-
const match = /^\/([A-Za-z0-9_-]+)(?:\s+(
|
|
54
|
+
const match = /^\/([A-Za-z0-9_-]+)(?:\s+([\s\S]*))?$/.exec(draft.trim());
|
|
55
55
|
if (!match) return null;
|
|
56
|
-
return { name: match[1], args: match[2]
|
|
56
|
+
return { name: match[1], args: AgentPrompts.#args(match[2] ?? "") };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Whitespace separates arguments, and quotes are how a sentence stays one of them — a prompt taking a single
|
|
61
|
+
* `String` is the common case, and splitting "plan the week" into three arguments fills the second parameter
|
|
62
|
+
* with the second word.
|
|
63
|
+
*/
|
|
64
|
+
static #args(rest: string): string[] {
|
|
65
|
+
const args: string[] = [];
|
|
66
|
+
for (const token of rest.matchAll(/"([^"]*)"|'([^']*)'|(\S+)/g)) args.push(token[1] ?? token[2] ?? token[3]);
|
|
67
|
+
return args;
|
|
57
68
|
}
|
|
58
69
|
|
|
59
70
|
/** The messages a prompt returns become the user's turn, the way an MCP client sends a `prompts/get` result. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const baseDictionary: import("./dictInfo.d.ts").ServiceDictInfo<[string, string], "ping" | "pingBody" | "pingParam" | "pingQuery" | "wsPing" | "pubsubPing", never, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view">;
|
|
1
|
+
export declare const baseDictionary: import("./dictInfo.d.ts").ServiceDictInfo<[string, string], "ping" | "pingBody" | "pingParam" | "pingQuery" | "wsPing" | "pubsubPing", never, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view">;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AgentEndpoint, AgentTurn, BaseEndpoint } from "akanjs/signal";
|
|
2
2
|
export declare const dictionary: {
|
|
3
|
-
base: import("./locale.d.ts").DictModule<import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view">, never>;
|
|
3
|
+
base: import("./locale.d.ts").DictModule<import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view">, never>;
|
|
4
4
|
agentTurn: import("./locale.d.ts").DictModule<import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc`, never>;
|
|
5
5
|
agent: import("./locale.d.ts").DictModule<import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, "agent.error.llmUnavailable" | "agent.error.deepseekRequestFailed">;
|
|
6
6
|
};
|
|
7
|
-
export declare const Err: import("./trans.d.ts").ErrConstructor<"agent.error.llmUnavailable" | "agent.error.deepseekRequestFailed">, translate: (lang: "en" | "ko" | "zhChs" | "zhCht" | "ja", key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, data?: import("./trans.d.ts").TranslationData) => string, msg: {
|
|
8
|
-
info: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
9
|
-
success: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
10
|
-
error: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
11
|
-
warning: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
12
|
-
loading: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
13
|
-
}, getDictionary: (lang: "en" | "ko" | "zhChs" | "zhCht" | "ja") => object, getAllDictionary: () => import("./trans.d.ts").RootDictionary, __Dict_Key__: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, __Error_Key__: "agent.error.llmUnavailable" | "agent.error.deepseekRequestFailed";
|
|
7
|
+
export declare const Err: import("./trans.d.ts").ErrConstructor<"agent.error.llmUnavailable" | "agent.error.deepseekRequestFailed">, translate: (lang: "en" | "ko" | "zhChs" | "zhCht" | "ja", key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, data?: import("./trans.d.ts").TranslationData) => string, msg: {
|
|
8
|
+
info: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
9
|
+
success: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
10
|
+
error: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
11
|
+
warning: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
12
|
+
loading: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
13
|
+
}, getDictionary: (lang: "en" | "ko" | "zhChs" | "zhCht" | "ja") => object, getAllDictionary: () => import("./trans.d.ts").RootDictionary, __Dict_Key__: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "remove" | "save" | "refresh" | "password" | "stop" | "send" | "skip" | "agent" | "ok" | "connecting" | "new" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "success" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "cancel" | "unauthorized" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "approve" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "addModel" | "createModel" | "createSuccess" | "updateModel" | "removeModel" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "edit" | "view"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, __Error_Key__: "agent.error.llmUnavailable" | "agent.error.deepseekRequestFailed";
|
|
@@ -8,6 +8,14 @@ export declare class AgentService extends AgentService_base {
|
|
|
8
8
|
toolCalls: import("./predefinedAdaptor.d.ts").AgentWireToolCall[];
|
|
9
9
|
stop: "end" | "toolUse";
|
|
10
10
|
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Folds a failed turn into the message text. `error` is a field only this wire has, so a provider mapping reads
|
|
13
|
+
* `text` and drops it — leaving the model an assistant turn that says nothing, with no hint that the attempt
|
|
14
|
+
* failed, and every reason to make the same one again. Done here rather than per adaptor because every adaptor
|
|
15
|
+
* would otherwise have to remember, and forgetting is silent.
|
|
16
|
+
*/
|
|
17
|
+
static explained(request: LlmTurnRequest): LlmTurnRequest;
|
|
18
|
+
private static explainedMessage;
|
|
11
19
|
/**
|
|
12
20
|
* Replaces every attachment the provider cannot read with a note naming it, so no adaptor has to think about
|
|
13
21
|
* attachments it does not support and none can lose one quietly. The model has to be *told*, not merely spared:
|
|
@@ -20,7 +20,7 @@ export declare class AgentPrompts {
|
|
|
20
20
|
constructor(signals: Record<string, SerializedSignal>);
|
|
21
21
|
list(): AgentPrompt[];
|
|
22
22
|
find(name: string): AgentPrompt | null;
|
|
23
|
-
/** `/name arg1
|
|
23
|
+
/** `/name arg1 "an arg with spaces"` — positional because a prompt's arguments are flat strings by protocol. */
|
|
24
24
|
static parseCommand(draft: string): {
|
|
25
25
|
name: string;
|
|
26
26
|
args: string[];
|
|
@@ -13,5 +13,11 @@ interface BubbleProps {
|
|
|
13
13
|
*/
|
|
14
14
|
results?: ReadonlyMap<string, ToolCallResult>;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Memoized because the transcript re-renders on every streamed delta and on every keystroke in the composer, and
|
|
18
|
+
* a settled bubble re-parses its markdown for nothing each time. The props are compared by identity, so the caller
|
|
19
|
+
* hands the same `results` map and `progress` value to every row — which is why only the rows that actually
|
|
20
|
+
* changed re-render.
|
|
21
|
+
*/
|
|
22
|
+
declare const _default: import("react").MemoExoticComponent<({ className, message, progress, results }: BubbleProps) => import("react/jsx-runtime").JSX.Element>;
|
|
23
|
+
export default _default;
|
package/types/ui/Agent/Chat.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type AgentRunner, type CompactOptions } from "../../vendor/use-agentic.d.ts";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import type { AttachReader } from "./attachment.d.ts";
|
|
4
|
+
import type { PersistOption } from "./sessionHistory.d.ts";
|
|
5
|
+
import type { VoiceEngine } from "./voice.d.ts";
|
|
6
6
|
export interface ChatProps {
|
|
7
7
|
className?: string;
|
|
8
8
|
title?: string;
|
|
@@ -21,6 +21,8 @@ export interface ChatProps {
|
|
|
21
21
|
persist?: PersistOption;
|
|
22
22
|
/** Renders in the page flow instead of floating above it — a zone chat that lives inside its own section. */
|
|
23
23
|
inline?: boolean;
|
|
24
|
+
/** `false` gives the browser its own Cmd/Ctrl+L back, for an app whose shell already spends that chord. */
|
|
25
|
+
shortcut?: boolean;
|
|
24
26
|
/**
|
|
25
27
|
* Reads a file the user attached into an attachment, or answers `null` to leave it to the built-in reader
|
|
26
28
|
* (images as bytes, text as text). This is where an app puts what needs a parser — a PDF's text, a spreadsheet's
|
|
@@ -38,10 +40,10 @@ export interface ChatProps {
|
|
|
38
40
|
/**
|
|
39
41
|
* The user-facing half of the in-page agent: one floating chat wired to the same surface the dock inspects.
|
|
40
42
|
* The conversation loop runs in this browser session — every tool call executes here, gated by the approval
|
|
41
|
-
* card — and the session lives in a ref, so it survives reopening the panel and dies with the page
|
|
42
|
-
*
|
|
43
|
-
* loop while keeping this UI.
|
|
43
|
+
* card — and the session lives in a ref, so it survives reopening the panel and dies with the page unless
|
|
44
|
+
* `persist` keeps it. An enclosing AgentProvider's session wins, which is how an app isolates a surface or swaps
|
|
45
|
+
* the loop while keeping this UI.
|
|
44
46
|
*/
|
|
45
|
-
export declare const DefaultChat: ({ className, title, instructions, runner, maxTurns, compact, defaultOpen, persist, inline, attach, voice, }: ChatProps) => ReactNode;
|
|
47
|
+
export declare const DefaultChat: ({ className, title, instructions, runner, maxTurns, compact, defaultOpen, persist, inline, shortcut, attach, voice, }: ChatProps) => ReactNode;
|
|
46
48
|
declare const _default: import("react").ComponentType<ChatProps>;
|
|
47
49
|
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { KeyboardEvent, Ref } from "react";
|
|
2
|
+
import type { AgentSession, MessageAttachment } from "../../vendor/use-agentic.d.ts";
|
|
3
|
+
interface ComposerProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
session: AgentSession;
|
|
6
|
+
draft: string;
|
|
7
|
+
attached: readonly MessageAttachment[];
|
|
8
|
+
/** Absent when the screen cannot listen — the same rule as publishing no tool for a control that is not drawn. */
|
|
9
|
+
mic?: {
|
|
10
|
+
listening: boolean;
|
|
11
|
+
onToggle: () => void;
|
|
12
|
+
};
|
|
13
|
+
onDraft: (text: string) => void;
|
|
14
|
+
onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
15
|
+
onFiles: (files: File[]) => void;
|
|
16
|
+
onRemoveFile: (idx: number) => void;
|
|
17
|
+
onSend: () => void;
|
|
18
|
+
onStop: () => void;
|
|
19
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
20
|
+
}
|
|
21
|
+
/** What the user writes with: the staged files above, and the controls that send or stop below them. */
|
|
22
|
+
export declare const Composer: ({ className, session, draft, attached, mic, onDraft, onKeyDown, onFiles, onRemoveFile, onSend, onStop, inputRef, }: ComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Ref } from "react";
|
|
2
|
+
interface LauncherProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** The chord that opens the chat, shown on hover. Null until the platform is known, which needs the client. */
|
|
6
|
+
hotkey?: {
|
|
7
|
+
label: string;
|
|
8
|
+
keys: string;
|
|
9
|
+
} | null;
|
|
10
|
+
/** Messages that arrived while the panel was closed, so a finished turn is not silent. */
|
|
11
|
+
unread: number;
|
|
12
|
+
onOpen: () => void;
|
|
13
|
+
buttonRef?: Ref<HTMLButtonElement>;
|
|
14
|
+
}
|
|
15
|
+
export declare const Launcher: ({ className, label, hotkey, unread, onOpen, buttonRef }: LauncherProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
package/types/ui/Agent/Menu.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface MenuRow {
|
|
2
|
+
name: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
/** The argument names a prompt takes, shown so a user knows what to type after the name. */
|
|
5
|
+
hint?: string;
|
|
6
|
+
pick: () => void;
|
|
7
|
+
}
|
|
3
8
|
interface MenuProps {
|
|
4
9
|
className?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
rows: MenuRow[];
|
|
11
|
+
/** Index the arrows are on. Enter picks it and Tab completes its name, so it has to be visible. */
|
|
12
|
+
selected: number;
|
|
13
|
+
onPick: (row: MenuRow) => void;
|
|
9
14
|
}
|
|
10
15
|
/** The `/` menu: this chat's own commands first, then the app's `prompt()` endpoints. */
|
|
11
|
-
export default function Menu({ className,
|
|
16
|
+
export default function Menu({ className, rows, selected, onPick }: MenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
17
|
export {};
|
package/types/ui/Agent/Zone.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type AgentRunner } from "../../vendor/use-agentic.d.ts";
|
|
3
|
-
import {
|
|
2
|
+
import { type AgentRunner, type CompactOptions } from "../../vendor/use-agentic.d.ts";
|
|
3
|
+
import type { PersistOption } from "./sessionHistory.d.ts";
|
|
4
4
|
export interface ZoneProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
/** Names the zone; the scope id and the `data-agent-zone` container both derive from it. */
|
|
@@ -10,6 +10,8 @@ export interface ZoneProps {
|
|
|
10
10
|
instructions?: string;
|
|
11
11
|
runner?: AgentRunner;
|
|
12
12
|
maxTurns?: number;
|
|
13
|
+
/** When this zone's conversation summarizes itself — same contract as the chat's own `compact`. */
|
|
14
|
+
compact?: CompactOptions;
|
|
13
15
|
/** Keeps this zone's transcript across reloads, keyed by the zone's scope path. */
|
|
14
16
|
persist?: PersistOption;
|
|
15
17
|
children: ReactNode;
|
|
@@ -20,4 +22,4 @@ export interface ZoneProps {
|
|
|
20
22
|
* zones are views, never walls. An `Agent.Chat` mounted inside binds to this session automatically, so two zones
|
|
21
23
|
* on one screen run two conversations in parallel, each seeing only its own subtree.
|
|
22
24
|
*/
|
|
23
|
-
export declare const Zone: ({ className, id, label, instructions, runner, maxTurns, persist, children }: ZoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const Zone: ({ className, id, label, instructions, runner, maxTurns, compact, persist, children, }: ZoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type AgentRunner, AgentSession, type CompactOptions } from "../../vendor/use-agentic.d.ts";
|
|
2
|
+
import { type PersistOption } from "./sessionHistory.d.ts";
|
|
3
|
+
export interface AgentSessionSetup {
|
|
4
|
+
/** Read per call rather than captured, so text the session builds follows a language switched mid-conversation. */
|
|
5
|
+
l: (key: string) => string;
|
|
6
|
+
/** The zone's scope path, empty for the root agent — it picks both the surface view and the persistence key. */
|
|
7
|
+
view?: string[];
|
|
8
|
+
runner?: AgentRunner;
|
|
9
|
+
instructions?: string;
|
|
10
|
+
maxTurns?: number;
|
|
11
|
+
compact?: CompactOptions;
|
|
12
|
+
persist?: PersistOption;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The one place a chat session is wired to the akan runtime. Chat and Zone both build one, and building it twice
|
|
16
|
+
* is how a zone came to be the only surface with no `compact` option — an option added on one side of a copy.
|
|
17
|
+
*/
|
|
18
|
+
export declare const agentSessionOf: ({ l, view, runner, instructions, maxTurns, compact, persist, }: AgentSessionSetup) => AgentSession;
|
|
@@ -7,6 +7,13 @@ export type AttachReader = (file: File) => Promise<MessageAttachment | null>;
|
|
|
7
7
|
* the user learns which file it was.
|
|
8
8
|
*/
|
|
9
9
|
export declare const maxAttachmentBytes: number;
|
|
10
|
+
/**
|
|
11
|
+
* Ceilings for one message rather than one file. The bytes ride inside a single turn's JSON, so what a provider
|
|
12
|
+
* refuses is the sum — and a count cap keeps a whole folder dropped onto the panel from becoming one request that
|
|
13
|
+
* cannot be sent and cannot be edited down without starting over.
|
|
14
|
+
*/
|
|
15
|
+
export declare const maxMessageAttachmentBytes: number;
|
|
16
|
+
export declare const maxMessageAttachments = 5;
|
|
10
17
|
export type AttachFailure = "tooLarge" | "unsupported";
|
|
11
18
|
export declare class Attachment {
|
|
12
19
|
#private;
|
|
@@ -20,4 +27,8 @@ export declare class Attachment {
|
|
|
20
27
|
*/
|
|
21
28
|
static read(file: File, attach?: AttachReader): Promise<MessageAttachment | AttachFailure>;
|
|
22
29
|
static failure(value: MessageAttachment | AttachFailure): value is AttachFailure;
|
|
30
|
+
/** What this attachment costs the request: base64 carries three bytes per four characters, less its padding. */
|
|
31
|
+
static bytesOf(attachment: MessageAttachment): number;
|
|
32
|
+
/** Same name and same size is the same file picked twice — the shape a re-drop or a double paste produces. */
|
|
33
|
+
static same(one: MessageAttachment, other: MessageAttachment): boolean;
|
|
23
34
|
}
|
|
@@ -13,5 +13,5 @@ export declare const Agent: {
|
|
|
13
13
|
StateKey: typeof StateKey;
|
|
14
14
|
Tool: typeof Tool;
|
|
15
15
|
Transcript: typeof Transcript;
|
|
16
|
-
Zone: ({ className, id, label, instructions, runner, maxTurns, persist, children }: import("./Zone.d.ts").ZoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
Zone: ({ className, id, label, instructions, runner, maxTurns, compact, persist, children, }: import("./Zone.d.ts").ZoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type SessionHistory } from "../../vendor/use-agentic.d.ts";
|
|
2
2
|
export type PersistOption = boolean | {
|
|
3
3
|
storage?: "session" | "local";
|
|
4
4
|
key?: string;
|
|
@@ -7,6 +7,8 @@ export type PersistOption = boolean | {
|
|
|
7
7
|
* Maps the `persist` prop onto a `SessionHistory` over web storage. Session storage is the default on purpose:
|
|
8
8
|
* surviving a refresh is the whole ask, and a transcript that dies with the tab never lingers on a shared machine
|
|
9
9
|
* or collides across tabs. `"local"` is the explicit opt-up. The envelope is versioned so a wire change discards
|
|
10
|
-
* stale transcripts instead of replaying them, and only the newest messages are kept under the cap
|
|
10
|
+
* stale transcripts instead of replaying them, and only the newest messages are kept under the cap — which is
|
|
11
|
+
* why the cap is applied *before* the pairing repair: the window it keeps can start between a tool call and the
|
|
12
|
+
* result answering it, and a transcript restored in that state is refused by the provider on its first turn.
|
|
11
13
|
*/
|
|
12
14
|
export declare const sessionHistoryOf: (persist: PersistOption | undefined, pathKey?: string) => SessionHistory | undefined;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DragEventHandler } from "react";
|
|
2
|
+
import type { AgentSession, MessageAttachment } from "../../vendor/use-agentic.d.ts";
|
|
3
|
+
import { type AttachReader } from "./attachment.d.ts";
|
|
4
|
+
interface ChatAttachmentsSetup {
|
|
5
|
+
session: AgentSession;
|
|
6
|
+
attach?: AttachReader;
|
|
7
|
+
l: (key: string, param?: Record<string, string | number>) => string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* What the composer is holding, and the ceilings it holds it under. Staged files are mirrored in a ref because a
|
|
11
|
+
* multi-file drop reads them one at a time: the cap has to see what the previous file of the same drop added, and
|
|
12
|
+
* React state inside that loop is still the value the render started with.
|
|
13
|
+
*/
|
|
14
|
+
export declare const useChatAttachments: ({ session, attach, l }: ChatAttachmentsSetup) => {
|
|
15
|
+
attached: MessageAttachment[];
|
|
16
|
+
dragging: boolean;
|
|
17
|
+
dropProps: {
|
|
18
|
+
[key: string]: DragEventHandler<HTMLElement>;
|
|
19
|
+
};
|
|
20
|
+
add: (files: File[]) => Promise<void>;
|
|
21
|
+
clear: () => void;
|
|
22
|
+
remove: (idx: number) => void;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AgentSession } from "../../vendor/use-agentic.d.ts";
|
|
2
|
+
import { type VoiceEngine } from "./voice.d.ts";
|
|
3
|
+
interface ChatVoiceSetup {
|
|
4
|
+
session: AgentSession;
|
|
5
|
+
engine?: VoiceEngine;
|
|
6
|
+
/** The chat's own version snapshot — every transcript change re-runs the reading policy. */
|
|
7
|
+
version: number;
|
|
8
|
+
onTranscript: (text: string) => void;
|
|
9
|
+
onFailed: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The chat's speech policy, which is the framework's and not the engine's: one utterance per press, the
|
|
13
|
+
* transcript landing in the composer to be corrected, barge-in on the next press or on Stop, and a reply read
|
|
14
|
+
* aloud **only when the ask arrived by voice** — a typed question never turns the speakers on.
|
|
15
|
+
*
|
|
16
|
+
* A question or an approval the loop parked on is read too, and only in that same case: the loop stops there,
|
|
17
|
+
* and a voice user staring at a card they were never told about is a conversation that simply ends.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useChatVoice: ({ session, engine, version, onTranscript, onFailed }: ChatVoiceSetup) => {
|
|
20
|
+
listening: boolean;
|
|
21
|
+
/** A screen that cannot listen renders no microphone — the rule that publishes no tool for a missing control. */
|
|
22
|
+
canListen: boolean;
|
|
23
|
+
silence: () => void;
|
|
24
|
+
/** Called by the send that opens a turn: only an ask that arrived by voice is answered out loud. */
|
|
25
|
+
take: () => void;
|
|
26
|
+
/** The draft was consumed by something that is not a new turn — an answer to a question the agent asked. */
|
|
27
|
+
drop: () => void;
|
|
28
|
+
toggle: () => void;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ChatMessage } from "../../vendor/use-agentic.d.ts";
|
|
2
|
+
/**
|
|
3
|
+
* ↑ walks back through what was sent, ↓ forward, and 0 is the draft it was walked away from. A single-line input
|
|
4
|
+
* does nothing of its own with the vertical arrows, so recall is free to take them.
|
|
5
|
+
*
|
|
6
|
+
* Seeded from the transcript rather than starting empty, because a persisted chat restores the conversation and
|
|
7
|
+
* losing only "what I just typed" across a reload is the one gap a user notices.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useDraftRecall: (messages: readonly ChatMessage[]) => {
|
|
10
|
+
has: boolean;
|
|
11
|
+
remember: (text: string) => void;
|
|
12
|
+
/** Answers the draft to show, or null when the walk cannot go that way. */
|
|
13
|
+
step: (delta: number, draft: string) => string | null;
|
|
14
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AgentPrompt, AgentPrompts } from "akanjs/store";
|
|
2
|
+
import { type ChatCommand } from "./ChatCommands.d.ts";
|
|
3
|
+
import type { MenuRow } from "./Menu.d.ts";
|
|
4
|
+
interface SlashMenuSetup {
|
|
5
|
+
draft: string;
|
|
6
|
+
prompts: AgentPrompts | null;
|
|
7
|
+
l: (key: string) => string;
|
|
8
|
+
onCommand: (command: ChatCommand) => void;
|
|
9
|
+
onPrompt: (prompt: AgentPrompt) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The `/` menu's rows and which one the keys are on. Built from this chat's own commands first and the app's
|
|
13
|
+
* `prompt()` endpoints after, with a prompt whose name a built-in already holds dropped rather than listed twice.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useSlashMenu: ({ draft, prompts, l, onCommand, onPrompt }: SlashMenuSetup) => {
|
|
16
|
+
rows: MenuRow[];
|
|
17
|
+
selected: number;
|
|
18
|
+
/** Reset when the draft is written to: a new query has a new first row, and Escape only hides the old one. */
|
|
19
|
+
reopen: () => void;
|
|
20
|
+
hide: () => void;
|
|
21
|
+
move: (delta: number) => void;
|
|
22
|
+
at: () => MenuRow;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -61,6 +61,11 @@ export declare class VoiceReader {
|
|
|
61
61
|
* splits what is left, because a whole answer that arrived in one render must not be read as one long utterance.
|
|
62
62
|
*/
|
|
63
63
|
flush(source: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* A line that is not part of the answer being tracked — the question or approval the loop parked on. It joins
|
|
66
|
+
* the same queue, so it is spoken after the sentence in flight rather than over it, and Stop still cancels it.
|
|
67
|
+
*/
|
|
68
|
+
say(text: string): void;
|
|
64
69
|
cancel(): void;
|
|
65
70
|
reset(): void;
|
|
66
71
|
}
|
|
@@ -42,9 +42,10 @@ export interface AgentSessionOptions {
|
|
|
42
42
|
settle?: () => Promise<void> | void;
|
|
43
43
|
/**
|
|
44
44
|
* Turns the turn cap into a question instead of a dead end. Omitted, the cap fails as before — a host that
|
|
45
|
-
* renders no `pendingQuestion` would otherwise wait forever for an answer nobody can give.
|
|
45
|
+
* renders no `pendingQuestion` would otherwise wait forever for an answer nobody can give. Read per ask rather
|
|
46
|
+
* than at construction, so the text follows a language switched mid-conversation.
|
|
46
47
|
*/
|
|
47
|
-
continueAsk?: {
|
|
48
|
+
continueAsk?: () => {
|
|
48
49
|
question: string;
|
|
49
50
|
keep: string;
|
|
50
51
|
};
|