forked from Leaf/amber-ui
改进 预设 prompt 的对话标题
This commit is contained in:
parent
ba91a48942
commit
3856533f8d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user