改进 预设 prompt 的对话标题
All checks were successful
Build / build (push) Successful in 1m28s

This commit is contained in:
ivamp 2024-09-27 23:07:32 +08:00
parent ba91a48942
commit 3856533f8d

View File

@ -30,7 +30,11 @@
:title="p.act"
hoverable
class="overflow-hidden cursor-pointer"
@click="overrideSystemPrompt = true;updateInputContent(p.prompt)"
@click="
overrideSystemPrompt = true;
overrideTitle = p.act;
updateInputContent(p.prompt);
"
>
<n-ellipsis style="max-width: 280px" :tooltip="false">
{{ p.prompt }}
@ -270,7 +274,8 @@ const assistantStore = useAssistantStore();
const message = useMessage();
const showUploadModal = ref(false);
const overrideSystemPrompt = ref(false)
const overrideSystemPrompt = ref(false);
const overrideTitle = ref("");
const prompts: Ref<Prompt[]> = ref([]);
prompts.value = awesomeChatGPTPrompts;
@ -453,11 +458,16 @@ async function sendMessage(
name: text.slice(0, 10),
};
if (overrideTitle.value != "") {
postData.name = overrideTitle.value;
overrideTitle.value = "";
}
if (overrideSystemPrompt.value) {
postData.prompt = " ";
}
overrideSystemPrompt.value = false
overrideSystemPrompt.value = false;
// 使
if (chatStore.currentAssistantId) {