diff --git a/chi_sim.traineddata b/chi_sim.traineddata new file mode 100644 index 0000000..f30ea94 Binary files /dev/null and b/chi_sim.traineddata differ diff --git a/eng.traineddata b/eng.traineddata new file mode 100644 index 0000000..6d11002 Binary files /dev/null and b/eng.traineddata differ diff --git a/renderer/src/components/k-rich-textarea/index.vue b/renderer/src/components/k-rich-textarea/index.vue new file mode 100644 index 0000000..0918e4c --- /dev/null +++ b/renderer/src/components/k-rich-textarea/index.vue @@ -0,0 +1,115 @@ + + + + + \ No newline at end of file diff --git a/renderer/src/components/k-rich-textarea/textarea.dto.ts b/renderer/src/components/k-rich-textarea/textarea.dto.ts new file mode 100644 index 0000000..2274508 --- /dev/null +++ b/renderer/src/components/k-rich-textarea/textarea.dto.ts @@ -0,0 +1,17 @@ + +interface PromptTextItem { + type: 'prompt' + text: string +} + +interface ResourceTextItem { + type: 'resource' + text: string +} + +interface TextItem { + type: 'text' + text: string +} + +export type RichTextItem = PromptTextItem | ResourceTextItem | TextItem; \ No newline at end of file diff --git a/renderer/src/components/main-panel/chat/options/prompt.vue b/renderer/src/components/main-panel/chat/options/prompt.vue index f922de6..422e4fe 100644 --- a/renderer/src/components/main-panel/chat/options/prompt.vue +++ b/renderer/src/components/main-panel/chat/options/prompt.vue @@ -59,6 +59,8 @@ function whenGetPromptResponse(msg: PromptsGetResponse) { try { const content = msg.messages[0].content; + selectPrompt.value = undefined; + if (content) { emits('update:modelValue', props.modelValue + content); } diff --git a/renderer/src/components/main-panel/chat/options/setting.vue b/renderer/src/components/main-panel/chat/options/setting.vue index 9b62c58..8bcfa21 100644 --- a/renderer/src/components/main-panel/chat/options/setting.vue +++ b/renderer/src/components/main-panel/chat/options/setting.vue @@ -3,7 +3,7 @@ - + @@ -11,7 +11,7 @@