This commit is contained in:
Timothy Jaeryang Baek
2026-08-13 18:19:25 -06:00
parent 4465f52a3e
commit 133549a87e
4 changed files with 100 additions and 25 deletions
+17 -2
View File
@@ -113,6 +113,15 @@
const i18n = getContext('i18n');
type AskUserPrompt = {
show: boolean;
questions: any[];
allowOther: boolean;
timeoutMs: number | null;
onConfirm: (value: any) => void;
onCancel: () => void;
};
export let onUpload: Function = (e) => {};
export let onChange: Function = () => {};
export let onWebSearchToggle: Function = () => {};
@@ -171,11 +180,13 @@
export let onQueueEdit: (id: string) => void = () => {};
export let onQueueDelete: (id: string) => void = () => {};
export let onUpdate: (data?: { file?: any }) => void = () => {};
export let askUser = {
export let askUser: AskUserPrompt = {
show: false,
questions: [],
allowOther: true,
onConfirm: (_value: any) => {}
timeoutMs: null,
onConfirm: (_value: any) => {},
onCancel: () => {}
};
export let chatTasks = [];
@@ -1593,9 +1604,13 @@
show={askUser.show}
questions={askUser.questions}
allowOther={askUser.allowOther}
timeoutMs={askUser.timeoutMs}
on:confirm={(e) => {
askUser.onConfirm(e.detail);
}}
on:cancel={() => {
askUser.onCancel();
}}
/>
</div>
{/if}