Commit 93b2fe08 by pangchong

style(aiAssistant): 优化组件代码格式和内容关键词配置

- 调整 AiAssistant 组件内元素的换行和缩进,提升代码可读性
- 统一列表项和文本间留空,改善界面显示格式
- 扩充常用功能关键词数组,增加拼音首字母、别名等匹配项
- 优化复制文本格式,避免多余换行,增强内容粘贴体验
- 更新主题配置文档格式,优化表格排列和对齐,提升文档易读性
parent 5bf68247
...@@ -172,7 +172,22 @@ export const FAQ_DATABASE: FaqItem[] = [ ...@@ -172,7 +172,22 @@ export const FAQ_DATABASE: FaqItem[] = [
category: 'insert', category: 'insert',
categoryName: '元素与排版', categoryName: '元素与排版',
title: '如何插入单选 / 多选项组(SELECTION)?', title: '如何插入单选 / 多选项组(SELECTION)?',
keywords: ['单选', '多选', '选项组', 'selection', 'checkbox', 'radio', '选择题', '勾选项', '符合性', 'xx', 'xuanxiang', 'dx', 'danxuan', 'duoxuan'], keywords: [
'单选',
'多选',
'选项组',
'selection',
'checkbox',
'radio',
'选择题',
'勾选项',
'符合性',
'xx',
'xuanxiang',
'dx',
'danxuan',
'duoxuan'
],
synonyms: ['怎么加勾选框', '添加单选框', '插入选项', '添加符合性检查', '多选框'], synonyms: ['怎么加勾选框', '添加单选框', '插入选项', '添加符合性检查', '多选框'],
answer: '选项组用于在工卡执行中提供符合性判断(如“合格/不合格”、“换件/原装”)。', answer: '选项组用于在工卡执行中提供符合性判断(如“合格/不合格”、“换件/原装”)。',
steps: [ steps: [
...@@ -274,7 +289,21 @@ export const FAQ_DATABASE: FaqItem[] = [ ...@@ -274,7 +289,21 @@ export const FAQ_DATABASE: FaqItem[] = [
category: 'insert', category: 'insert',
categoryName: '元素与排版', categoryName: '元素与排版',
title: '如何在文本中插入交叉引用(REFBLOCK / REFINT)与功能号(EIN)?', title: '如何在文本中插入交叉引用(REFBLOCK / REFINT)与功能号(EIN)?',
keywords: ['引用', 'refblock', 'refint', 'refext', 'ein', '功能号', 'grphcref', '交叉引用', '附图引用', 'yy', 'yinyong', 'gnh', 'gongnenghao'], keywords: [
'引用',
'refblock',
'refint',
'refext',
'ein',
'功能号',
'grphcref',
'交叉引用',
'附图引用',
'yy',
'yinyong',
'gnh',
'gongnenghao'
],
synonyms: ['怎么加引用', '怎么关联其他章节', '插入功能号', '图纸引用', '添加适用性'], synonyms: ['怎么加引用', '怎么关联其他章节', '插入功能号', '图纸引用', '添加适用性'],
answer: '在富文本编辑段落(PARAC/PARA)中,支持插入符合航空标准的一系列行内引用与标识:', answer: '在富文本编辑段落(PARAC/PARA)中,支持插入符合航空标准的一系列行内引用与标识:',
steps: [ steps: [
...@@ -1032,7 +1061,22 @@ export const FAQ_DATABASE: FaqItem[] = [ ...@@ -1032,7 +1061,22 @@ export const FAQ_DATABASE: FaqItem[] = [
category: 'settings', category: 'settings',
categoryName: '设置与快捷键', categoryName: '设置与快捷键',
title: '工卡 XML 编辑器有哪些常用快捷键?', title: '工卡 XML 编辑器有哪些常用快捷键?',
keywords: ['快捷键', '键盘快捷键', 'ctrl+z', 'ctrl+y', 'ctrl+shift+d', 'ctrl+f', '撤销', '重做', '主题切换', 'shortcuts', 'kjj', 'kuaijiejian', 'cx', 'chexiao'], keywords: [
'快捷键',
'键盘快捷键',
'ctrl+z',
'ctrl+y',
'ctrl+shift+d',
'ctrl+f',
'撤销',
'重做',
'主题切换',
'shortcuts',
'kjj',
'kuaijiejian',
'cx',
'chexiao'
],
synonyms: ['有哪些按键操作', '撤销重做快捷键', '快捷键列表', '搜索快捷键', '深色模式快捷键'], synonyms: ['有哪些按键操作', '撤销重做快捷键', '快捷键列表', '搜索快捷键', '深色模式快捷键'],
answer: '熟练使用快捷键可大幅提升工卡编写效率:', answer: '熟练使用快捷键可大幅提升工卡编写效率:',
steps: [ steps: [
...@@ -1069,7 +1113,22 @@ export const FAQ_DATABASE: FaqItem[] = [ ...@@ -1069,7 +1113,22 @@ export const FAQ_DATABASE: FaqItem[] = [
category: 'settings', category: 'settings',
categoryName: '设置与快捷键', categoryName: '设置与快捷键',
title: '如何切换暗黑模式、主题色或调整字号?', title: '如何切换暗黑模式、主题色或调整字号?',
keywords: ['暗黑模式', '黑夜模式', '明亮模式', '主题色', '换皮肤', '字体大小', '字号', '偏好设置', '皮肤', 'ah', 'anhei', 'zhuti', 'zt', 'zh'], keywords: [
'暗黑模式',
'黑夜模式',
'明亮模式',
'主题色',
'换皮肤',
'字体大小',
'字号',
'偏好设置',
'皮肤',
'ah',
'anhei',
'zhuti',
'zt',
'zh'
],
synonyms: ['怎么开夜间模式', '怎么改颜色', '字体太小怎么变大', '偏好设置在哪里', '改字体'], synonyms: ['怎么开夜间模式', '怎么改颜色', '字体太小怎么变大', '偏好设置在哪里', '改字体'],
answer: '系统支持极高自由度的界面个性化定制与偏好管理:', answer: '系统支持极高自由度的界面个性化定制与偏好管理:',
steps: [ steps: [
......
...@@ -672,9 +672,7 @@ export const useAiAssistant = () => { ...@@ -672,9 +672,7 @@ export const useAiAssistant = () => {
textToCopy = `【${msg.faq.title}】\n${msg.faq.answer}` textToCopy = `【${msg.faq.title}】\n${msg.faq.answer}`
if (msg.faq.steps && msg.faq.steps.length > 0) { if (msg.faq.steps && msg.faq.steps.length > 0) {
const parsed = parseStepItems(msg.faq.steps) const parsed = parseStepItems(msg.faq.steps)
textToCopy += textToCopy += `\n\n操作指引:\n` + parsed.map((s) => (s.isSubItem ? ` • ${s.text}` : `${s.stepNumber}. ${s.text}`)).join('\n')
`\n\n操作指引:\n` +
parsed.map((s) => (s.isSubItem ? ` • ${s.text}` : `${s.stepNumber}. ${s.text}`)).join('\n')
} }
if (msg.faq.highlights && msg.faq.highlights.length > 0) { if (msg.faq.highlights && msg.faq.highlights.length > 0) {
textToCopy += `\n\n提示:\n` + msg.faq.highlights.map((h) => `• ${h}`).join('\n') textToCopy += `\n\n提示:\n` + msg.faq.highlights.map((h) => `• ${h}`).join('\n')
......
...@@ -296,7 +296,9 @@ ...@@ -296,7 +296,9 @@
</div> </div>
<!-- 主步骤 (带序号) --> <!-- 主步骤 (带序号) -->
<div v-else class="text-[11px] text-color2 flex items-start gap-1.5 leading-relaxed"> <div v-else class="text-[11px] text-color2 flex items-start gap-1.5 leading-relaxed">
<span class="font-bold shrink-0" :style="{ color: themeVars.primaryColor }">{{ step.stepNumber }}.</span> <span class="font-bold shrink-0" :style="{ color: themeVars.primaryColor }">
{{ step.stepNumber }}.
</span>
<span class="flex-1 text-left break-words">{{ step.text }}</span> <span class="flex-1 text-left break-words">{{ step.text }}</span>
</div> </div>
</template> </template>
...@@ -381,7 +383,8 @@ ...@@ -381,7 +383,8 @@
@click="handleAskQuestion(getRelatedFaq(rId)!.title)" @click="handleAskQuestion(getRelatedFaq(rId)!.title)"
> >
<span class="flex-1 leading-relaxed text-left break-words"> <span class="flex-1 leading-relaxed text-left break-words">
<span :style="{ color: themeVars.primaryColor }">🔹</span> {{ getRelatedFaq(rId)!.title }} <span :style="{ color: themeVars.primaryColor }">🔹</span>
{{ getRelatedFaq(rId)!.title }}
</span> </span>
<n-icon <n-icon
class="text-color3 group-hover:text-color1 transition-colors shrink-0 ml-1.5 opacity-60 group-hover:opacity-100" class="text-color3 group-hover:text-color1 transition-colors shrink-0 ml-1.5 opacity-60 group-hover:opacity-100"
...@@ -408,7 +411,9 @@ ...@@ -408,7 +411,9 @@
<button <button
type="button" type="button"
class="flex items-center gap-1 px-1.5 py-0.5 rounded border border-divider transition-colors focus:outline-none" class="flex items-center gap-1 px-1.5 py-0.5 rounded border border-divider transition-colors focus:outline-none"
:class="msg.feedback === 'helpful' ? 'font-bold' : 'hover:border-color3 text-color3 hover:text-color1'" :class="
msg.feedback === 'helpful' ? 'font-bold' : 'hover:border-color3 text-color3 hover:text-color1'
"
:style=" :style="
msg.feedback === 'helpful' msg.feedback === 'helpful'
? { ? {
...@@ -426,7 +431,9 @@ ...@@ -426,7 +431,9 @@
<button <button
type="button" type="button"
class="flex items-center gap-1 px-1.5 py-0.5 rounded border border-divider transition-colors focus:outline-none" class="flex items-center gap-1 px-1.5 py-0.5 rounded border border-divider transition-colors focus:outline-none"
:class="msg.feedback === 'unhelpful' ? 'font-bold' : 'hover:border-color3 text-color3 hover:text-color1'" :class="
msg.feedback === 'unhelpful' ? 'font-bold' : 'hover:border-color3 text-color3 hover:text-color1'
"
:style=" :style="
msg.feedback === 'unhelpful' msg.feedback === 'unhelpful'
? { ? {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment