✨ feat(vscode): 预览里代码的上色和卡片种类色跟着当前颜色主题走

This commit is contained in:
cruldra committed 2026-10-13 11:27:24 +11:00
1 parent 19302bbed0
commit dff38ee0c5
26 files changed
+1286 -75

No files matched your search

+4
View File
@@ -12,6 +12,7 @@ import type { DocumentDiff } from '../diff/previewDiff'
import type { ShownName } from '../nameResolution'
import type { ProfileChoice } from '../qa/askProfiles'
import type { AskRound } from '../qa/asks'
import type { CodeColors } from '../theme/codeColors'
import type { Excluded, FilterState } from './blockFilter'
export type { Excluded, ShownName }
@@ -138,6 +139,8 @@ export interface StickyScrollSettings {
* stickyScroll:VS Code 的 Sticky Scroll 设置(按这份文件取,语言自己的设置优先),见 StickyScrollSettings;ready 后发一次,设置改了再发
* occurrencesFound:id 那次 findOccurrences 的回答,语言扩展没答(或没装)就是空的
* filter:整个工作区共用的块筛选和「只看改动」开关;ready 后先于第一份文档发一次,之后任何一个预览改了都发给所有预览
* codeColors:当前颜色主题(叠上用户设置里改的)给代码的配色,见 CodeColors,页面设成词性、种类的颜色变量;
* ready 后先于第一份文档发一次,换了颜色主题、改了代码配色的设置再发给所有预览
* qa:这份文件的问答;ready 后发一次,问答、正在答的问题变了再发
* profiles:kind 那种对话输入框旁边的 profile 下拉:选项和选中的那项;ready 后两种各发一次,任何一个预览改了哪种就把哪种发给所有预览
* answer:askId 那个问题的回答长了(text 是到现在为止的全文)、或换了在做的事
@@ -170,6 +173,7 @@ export type ExtensionToWebview
| { type: 'moveOccurrence', step: 1 | -1 }
| { type: 'displayNames', version: number, names: ShownName[] }
| ({ type: 'filter' } & FilterState)
| ({ type: 'codeColors' } & CodeColors)
| QaMessage
| ({ type: 'profiles', kind: ChatKind } & ProfileChoice)
| { type: 'answer', askId: string, text: string, activity?: string }