feat: 逻辑优化

This commit is contained in:
digua
2025-12-06 21:16:40 +08:00
parent 7ec5a5ac0b
commit 22d57de407
3 changed files with 16 additions and 16 deletions
@@ -138,8 +138,8 @@ onMounted(() => {
<UAlert v-if="configs.length === 0" color="warning" variant="outline" icon="i-lucide-terminal" class="p-2">
<template #title>
<p>
强烈建议配置本地模型分析聊天记录更加安全个人实测3B小模型也能满足分析需求而且可以无限量分析本地模型部署参考教程
<a href="https://baidu.com" class="text-pink-500" target="_blank">使用Parallax配置本地模型</a>
强烈建议配置本地模型分析聊天记录更加安全个人实测8B小模型也能满足分析需求而且可以无限量分析本地模型部署参考
<a href="https://github.com/GradientHQ/parallax" class="text-pink-500" target="_blank">GradientHQ/parallax</a>
</p>
</template>
</UAlert>
+12 -12
View File
@@ -17,9 +17,9 @@ import type { PromptPreset } from '@/types/chat'
export const DEFAULT_GROUP_PRESET_ID = 'builtin-group-default'
/** 默认私聊预设ID */
export const DEFAULT_PRIVATE_PRESET_ID = 'builtin-private-default'
/** 赛博判官群聊预设ID */
/** 玩梗模式群聊预设ID */
export const CYBER_JUDGE_GROUP_PRESET_ID = 'builtin-group-cyber-judge'
/** 赛博判官私聊预设ID */
/** 玩梗模式私聊预设ID */
export const CYBER_JUDGE_PRIVATE_PRESET_ID = 'builtin-private-cyber-judge'
/** 弱智吧群聊预设ID */
export const RUOZHI_GROUP_PRESET_ID = 'builtin-group-ruozhi'
@@ -39,7 +39,7 @@ export function getDefaultRoleDefinition(
): string {
const chatTypeDesc = chatType === 'private' ? '私聊' : '群聊'
// 赛博判官风格
// 玩梗模式风格
if (style === 'cyber-judge') {
return `你是一个混迹互联网多年的"赛博判官"和"顶级嘴替"。
你的任务是基于工具提供的${chatTypeDesc}记录数据,对用户进行"降维打击"式的分析。
@@ -86,7 +86,7 @@ export function getDefaultResponseRules(
chatType: 'group' | 'private',
style: 'default' | 'cyber-judge' | 'ruozhi' = 'default'
): string {
// 赛博判官风格
// 玩梗模式风格
if (style === 'cyber-judge') {
const example =
chatType === 'private'
@@ -171,10 +171,10 @@ const BUILTIN_GROUP_DEFAULT: PromptPreset = {
updatedAt: Date.now(),
}
/** 内置群聊预设 - 赛博判官 */
/** 内置群聊预设 - 玩梗模式 */
const BUILTIN_GROUP_CYBER_JUDGE: PromptPreset = {
id: CYBER_JUDGE_GROUP_PRESET_ID,
name: '赛博判官',
name: '玩梗模式',
chatType: 'group',
roleDefinition: getDefaultRoleDefinition('group', 'cyber-judge'),
responseRules: getDefaultResponseRules('group', 'cyber-judge'),
@@ -195,10 +195,10 @@ const BUILTIN_PRIVATE_DEFAULT: PromptPreset = {
updatedAt: Date.now(),
}
/** 内置私聊预设 - 赛博判官 */
/** 内置私聊预设 - 玩梗模式 */
const BUILTIN_PRIVATE_CYBER_JUDGE: PromptPreset = {
id: CYBER_JUDGE_PRIVATE_PRESET_ID,
name: '赛博判官',
name: '玩梗模式',
chatType: 'private',
roleDefinition: getDefaultRoleDefinition('private', 'cyber-judge'),
responseRules: getDefaultResponseRules('private', 'cyber-judge'),
@@ -207,10 +207,10 @@ const BUILTIN_PRIVATE_CYBER_JUDGE: PromptPreset = {
updatedAt: Date.now(),
}
/** 内置群聊预设 - 弱智吧 */
/** 内置群聊预设 - 弱智吧对话模式 */
const BUILTIN_GROUP_RUOZHI: PromptPreset = {
id: RUOZHI_GROUP_PRESET_ID,
name: '弱智吧',
name: '弱智吧对话模式',
chatType: 'group',
roleDefinition: getDefaultRoleDefinition('group', 'ruozhi'),
responseRules: getDefaultResponseRules('group', 'ruozhi'),
@@ -219,10 +219,10 @@ const BUILTIN_GROUP_RUOZHI: PromptPreset = {
updatedAt: Date.now(),
}
/** 内置私聊预设 - 弱智吧 */
/** 内置私聊预设 - 弱智吧对话模式 */
const BUILTIN_PRIVATE_RUOZHI: PromptPreset = {
id: RUOZHI_PRIVATE_PRESET_ID,
name: '弱智吧',
name: '弱智吧对话模式',
chatType: 'private',
roleDefinition: getDefaultRoleDefinition('private', 'ruozhi'),
responseRules: getDefaultResponseRules('private', 'ruozhi'),
@@ -125,7 +125,7 @@ function openExternalLink(url: string) {
<div class="rounded-xl border border-gray-200 p-4 dark:border-gray-700">
<div class="mb-3 flex items-center gap-2">
<UIcon name="i-heroicons-device-phone-mobile" class="h-5 w-5 text-blue-500" />
<h3 class="font-semibold text-gray-900 dark:text-white">微信</h3>
<h3 class="font-semibold text-gray-900 dark:text-white">微信或其他聊天应用</h3>
</div>
<ol class="mb-4 space-y-2">
<li class="flex items-start gap-3 text-sm text-gray-600 dark:text-gray-300">
@@ -134,7 +134,7 @@ function openExternalLink(url: string) {
>
1
</span>
<span>网络上工具较多请自行找工具导出聊天记录</span>
<span>Github上有很多开源的导出工具请自行找工具导出微信等软件的聊天记录</span>
</li>
<li class="flex items-start gap-3 text-sm text-gray-600 dark:text-gray-300">
<span