@max-null/dsh-node-appearance 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -11
- package/docs/shots/Turn/346/221/230/350/246/201/346/235/241-/346/224/266/350/265/267.png +0 -0
- package/docs/shots//347/233/256/346/240/207/350/257/246/346/203/205-/345/210/206/346/235/241/346/212/230/350/241/214.png +0 -0
- package/docs/shots//347/273/204/345/244/264/347/235/200/350/211/262-/345/261/225/345/274/200.png +0 -0
- package/docs/shots//347/273/204/345/244/264/347/235/200/350/211/262-/346/224/266/350/265/267.png +0 -0
- package/docs/shots//350/247/246/345/217/221/345/215/241-/345/261/225/345/274/200.png +0 -0
- package/docs/shots//350/247/246/345/217/221/345/215/241-/346/224/266/350/265/267.png +0 -0
- package/lib/client.js +590 -82
- package/lib/client.js.map +1 -1
- package/lib/index.js +2 -0
- package/lib/types/client/goal-detail.d.ts.map +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/objective.d.ts +19 -0
- package/lib/types/client/objective.d.ts.map +1 -0
- package/lib/types/client/palette.d.ts +20 -3
- package/lib/types/client/palette.d.ts.map +1 -1
- package/lib/types/client/settings-card.d.ts.map +1 -1
- package/lib/types/client/trigger-card.d.ts +20 -0
- package/lib/types/client/trigger-card.d.ts.map +1 -0
- package/lib/types/client/trigger-model.d.ts +135 -0
- package/lib/types/client/trigger-model.d.ts.map +1 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
export declare const NODE_APPEARANCE_NS = "node-appearance";
|
|
10
10
|
/** The plugin's style tag identity (removed/replaced on every re-paint). */
|
|
11
11
|
export declare const STYLE_TAG_ID = "node-appearance/rules";
|
|
12
|
-
/** One paintable node category. `command`, `thinking`, `context` are non-tool rows. */
|
|
13
|
-
export type NodeCategory = 'search' | 'agent' | 'execute' | 'file' | 'deliver' | 'task' | 'ask' | 'command' | 'thinking' | 'context' | 'steering' | 'other';
|
|
12
|
+
/** One paintable node category. `command`, `thinking`, `context`, `summary` are non-tool rows. */
|
|
13
|
+
export type NodeCategory = 'search' | 'agent' | 'execute' | 'file' | 'deliver' | 'task' | 'ask' | 'command' | 'thinking' | 'context' | 'summary' | 'steering' | 'other';
|
|
14
14
|
/** Accent color per category (CSS colors). */
|
|
15
15
|
export type NodeAppearanceColors = Record<NodeCategory, string>;
|
|
16
16
|
/** The settings value this plugin reads from its namespace scope. */
|
|
@@ -25,7 +25,24 @@ export interface NodeAppearanceSettings {
|
|
|
25
25
|
/** Initial palette: mid-luminance hues readable on both light and dark themes. */
|
|
26
26
|
export declare const DEFAULT_COLORS: NodeAppearanceColors;
|
|
27
27
|
/** Wire tool name → category for the shipped mapping. */
|
|
28
|
-
export declare const TOOL_CATEGORIES: Record<Exclude<NodeCategory, 'command' | 'thinking' | 'context' | 'steering'>, readonly string[]>;
|
|
28
|
+
export declare const TOOL_CATEGORIES: Record<Exclude<NodeCategory, 'command' | 'thinking' | 'context' | 'summary' | 'steering'>, readonly string[]>;
|
|
29
|
+
/**
|
|
30
|
+
* The activity keys a step-process group header publishes on its
|
|
31
|
+
* `data-process-activity` attribute. The set is the key list of ui-chat's
|
|
32
|
+
* `ChatGroupSeat` `PROCESS_ICONS`, which is identical in kernel 0.1.7-rc.2 and
|
|
33
|
+
* 0.2.0-rc.1. A closed group reports the kernel's top-ranked category; a
|
|
34
|
+
* running one reports its live activity.
|
|
35
|
+
*/
|
|
36
|
+
export type ProcessActivityKind = 'thinking' | 'read' | 'readImage' | 'search' | 'edit' | 'write' | 'commands' | 'code' | 'webSearch' | 'webFetch' | 'subagents' | 'plan' | 'questions' | 'tools';
|
|
37
|
+
/**
|
|
38
|
+
* Process activity → the category whose color paints a collapsed group header.
|
|
39
|
+
*
|
|
40
|
+
* The mapping lands on categories the plugin already ships, so group headers
|
|
41
|
+
* reuse the configured palette and add no settings field. It is deliberately
|
|
42
|
+
* the same classification the expanded member rows get: `search` here means
|
|
43
|
+
* code search (`grep`/`glob`, a `file` category tool), not `web_search`.
|
|
44
|
+
*/
|
|
45
|
+
export declare const PROCESS_ACTIVITIES: Record<ProcessActivityKind, NodeCategory>;
|
|
29
46
|
/**
|
|
30
47
|
* Accept a configured CSS color (hex, color functions) or reject it so an
|
|
31
48
|
* invalid value falls back to the category default instead of poisoning CSS.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../src/client/palette.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,oBAAoB,CAAA;AAEnD,4EAA4E;AAC5E,eAAO,MAAM,YAAY,0BAAgC,CAAA;AAEzD,
|
|
1
|
+
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../src/client/palette.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,oBAAoB,CAAA;AAEnD,4EAA4E;AAC5E,eAAO,MAAM,YAAY,0BAAgC,CAAA;AAEzD,kGAAkG;AAClG,MAAM,MAAM,YAAY,GACpB,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAA;AAEhJ,8CAA8C;AAC9C,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AAE/D,qEAAqE;AACrE,MAAM,WAAW,sBAAsB;IACrC,uEAAuE;IACvE,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAClC,sEAAsE;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAA;IAClD,yDAAyD;IACzD,UAAU,CAAC,EA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B,CAAC,sBAAsB,CAAC,CAAC,CAAA;KAC/E,CAAA;IACD,oFAAoF;IACpF,KAAK,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACnD,yCAAyC;IACzC,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpC,yDAAyD;IACzD,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7D,2DAA2D;IAC3D,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/C,gCAAgC;IAChC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC;AAED,4DAA4D;AAC5D,MAAM,MAAM,sBAAsB,GAChC,YAAY,CAAC,uBAAuB,CAAC,GACnC,UAAU,CAAC,qBAAqB,CAAC,CAAA;AA6CrC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE,sBAAsB,+BAgIvJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type TriggerNodeLike, type TriggerTranslate } from './trigger-model.ts';
|
|
2
|
+
/** 本卡从 slot owner 收到的字段;其余 owner props 与本卡无关。 */
|
|
3
|
+
export interface TriggerCardProps {
|
|
4
|
+
/**
|
|
5
|
+
* Chat Node。上下文消息在 `node.data` 上 —— 官方 `TurnTriggerNodeView`
|
|
6
|
+
* 读的也是 `node.data.content` / `.source` / `.time`,`node` 本身只有
|
|
7
|
+
* kind / key / location 这些位置信息。
|
|
8
|
+
*/
|
|
9
|
+
node: {
|
|
10
|
+
data: TriggerNodeLike;
|
|
11
|
+
};
|
|
12
|
+
t: TriggerTranslate;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 渲染一张触发通知卡。
|
|
16
|
+
* @param props - 节点数据与翻译席位(注册时声明 `chat` 命名空间)。
|
|
17
|
+
* @returns 折叠卡;收起的展开体由内容形态决定。
|
|
18
|
+
*/
|
|
19
|
+
export declare function TriggerCard({ node, t }: TriggerCardProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=trigger-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger-card.d.ts","sourceRoot":"","sources":["../../../src/client/trigger-card.tsx"],"names":[],"mappings":"AAiCA,OAAO,EAE8C,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAC/F,MAAM,oBAAoB,CAAA;AAI3B,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,IAAI,EAAE;QAAE,IAAI,EAAE,eAAe,CAAA;KAAE,CAAA;IAC/B,CAAC,EAAE,gBAAgB,CAAA;CACpB;AAqED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,gBAAgB,+BAsCxD"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 触发通知卡的派生逻辑:把内核发来的那条「唤醒本轮」的上下文消息,变成卡片
|
|
3
|
+
* 要显示的东西 —— 标题与图标、目标轮次的字段、以及时间戳。
|
|
4
|
+
*
|
|
5
|
+
* 本文件只放纯函数,组件只做 JSX(与 `ask-model` / `deliverable-model` 同构)。
|
|
6
|
+
*
|
|
7
|
+
* ## 为什么需要它
|
|
8
|
+
*
|
|
9
|
+
* 官方 `TurnTriggerNodeView` 把 `node.data.content` 原样交给 `NoticeBody`
|
|
10
|
+
* (→ `ModelFacingContent` → `<pre>`)。对目标轮次来说,那段 content 是
|
|
11
|
+
* **模型提示词的原文**:
|
|
12
|
+
*
|
|
13
|
+
* ```
|
|
14
|
+
* <goal_round>
|
|
15
|
+
* Objective: "……"
|
|
16
|
+
* Round: 1/256
|
|
17
|
+
*
|
|
18
|
+
* Continue working toward the objective …
|
|
19
|
+
* </goal_round>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* 骨架(标签、`Objective:` 前缀、JSON 转义)对人不构成信息,却占满了展开区。
|
|
23
|
+
* 本插件接管这个 key,把这些字段还原成人读的形式。
|
|
24
|
+
*
|
|
25
|
+
* ## 解析是「全有或全无」
|
|
26
|
+
*
|
|
27
|
+
* `<goal_round>` 的结构是内核私有约定(`goal-round-driver/src/prompt.ts`),
|
|
28
|
+
* 它一变,任何半解析的结果都会显示成一张自信但不完整的卡片。所以解析失败时
|
|
29
|
+
* 整卡退回「原文 + 等宽显示」的等价形态,绝不显示半截字段 —— 判据与
|
|
30
|
+
* `deliverable-model`、`ContextBody` 的 `instructionChanges()` 同一条。
|
|
31
|
+
*
|
|
32
|
+
* ## 接管是全 key 的
|
|
33
|
+
*
|
|
34
|
+
* `conversation.chat.node` 是 keyed cell,同一 key 只有 priority 最低的注册
|
|
35
|
+
* 会渲染。注册 `turn-trigger` 的 `priority: -1` 会让**全部**触发来源都走本
|
|
36
|
+
* 插件组件,所以 {@link turnTriggerDetails} 复刻官方的 kind → 标题/图标映射
|
|
37
|
+
* (含默认分支),非目标轮次的来源原样显示。
|
|
38
|
+
*/
|
|
39
|
+
/** 注入的 locale 翻译函数(注册时声明 `chat` 命名空间)。 */
|
|
40
|
+
export interface TriggerTranslate {
|
|
41
|
+
(key: string, params?: Record<string, string | number>): string;
|
|
42
|
+
}
|
|
43
|
+
/** 官方 `turn-trigger.ts` 的 `TurnTriggerIcon`:一族里挑一个已有的图标字形。 */
|
|
44
|
+
export type TriggerIcon = 'agent' | 'github' | 'goal' | 'job' | 'plugin' | 'request' | 'schedule' | 'subagent' | 'team' | 'webhook';
|
|
45
|
+
/** 本卡从 `node.source` 读到的形状(内核记录的来源,鸭子类型)。 */
|
|
46
|
+
export interface TriggerSourceLike {
|
|
47
|
+
kind?: unknown;
|
|
48
|
+
provider?: unknown;
|
|
49
|
+
round?: unknown;
|
|
50
|
+
}
|
|
51
|
+
/** 本卡从 `node` 取用的字段(其余字段与本卡无关)。 */
|
|
52
|
+
export interface TriggerNodeLike {
|
|
53
|
+
/** 记录时间(Unix epoch ms)。 */
|
|
54
|
+
time: number;
|
|
55
|
+
/** 模型可见的内容块。 */
|
|
56
|
+
content: unknown;
|
|
57
|
+
/** 持久化的来源标注。 */
|
|
58
|
+
source: unknown;
|
|
59
|
+
}
|
|
60
|
+
/** 内容的一段:文本,或本版本不认识的块(照官方做法单独渲染,不让它消失)。 */
|
|
61
|
+
export type ContentRun = {
|
|
62
|
+
kind: 'text';
|
|
63
|
+
text: string;
|
|
64
|
+
} | {
|
|
65
|
+
kind: 'block';
|
|
66
|
+
block: unknown;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* 拆开内容块:文本与未知块各成一段。
|
|
70
|
+
* @param content - 持久化的内容块数组。
|
|
71
|
+
* @returns 分段结果;不是数组时返回 null(调用方走等价外壳)。
|
|
72
|
+
*/
|
|
73
|
+
export declare function contentRuns(content: unknown): ContentRun[] | null;
|
|
74
|
+
/**
|
|
75
|
+
* 全部内容都是文本块时把它们拼起来。
|
|
76
|
+
*
|
|
77
|
+
* 目标轮次的提示词是**单个**文本块,所以拼起来就能直接拿去解析。出现任何
|
|
78
|
+
* 非文本块即返回 null —— 那种内容本卡不负责解释,交给等价外壳按块渲染。
|
|
79
|
+
* @param content - 持久化的内容块数组。
|
|
80
|
+
* @returns 拼接后的文本,或 null。
|
|
81
|
+
*/
|
|
82
|
+
export declare function plainText(content: unknown): string | null;
|
|
83
|
+
/** 识别出的触发来源:chat 字典的标题 key + 一族图标。 */
|
|
84
|
+
export interface TriggerDetails {
|
|
85
|
+
/** `message.trigger.*` 的 key,交给 `t()` 取文案。 */
|
|
86
|
+
titleKey: string;
|
|
87
|
+
icon: TriggerIcon;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* 由来源标注判断该显示成什么 —— 逐条复刻官方 `turn-trigger.ts` 的 switch。
|
|
91
|
+
*
|
|
92
|
+
* 未识别的来源保留「收到执行请求」这一默认,**不假装知道**它的身份或结果
|
|
93
|
+
* (官方注释:Custom sources remain visible without attributing unrecorded
|
|
94
|
+
* identity or success)。
|
|
95
|
+
* @param source - 持久化的来源标注。
|
|
96
|
+
* @returns 标题 key 与图标。
|
|
97
|
+
*/
|
|
98
|
+
export declare function turnTriggerDetails(source: unknown): TriggerDetails;
|
|
99
|
+
/** 一次目标轮次,字段已从提示词里还原。 */
|
|
100
|
+
export interface GoalRound {
|
|
101
|
+
/** 目标原文(JSON 转义已还原)。 */
|
|
102
|
+
objective: string;
|
|
103
|
+
/** 本轮序号。 */
|
|
104
|
+
round: number;
|
|
105
|
+
/** 轮次上限。 */
|
|
106
|
+
maxRounds: number;
|
|
107
|
+
/** `Round:` 行之后那段发给模型的执行指令。 */
|
|
108
|
+
instruction: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* 解析一段目标轮次提示词;结构不符即整体放弃。
|
|
112
|
+
* @param text - 内容拼接后的文本。
|
|
113
|
+
* @returns 还原后的字段,或 null。
|
|
114
|
+
*/
|
|
115
|
+
export declare function parseGoalRound(text: string): GoalRound | null;
|
|
116
|
+
/**
|
|
117
|
+
* 取一条消息的目标轮次,供卡片决定用哪种展开体。
|
|
118
|
+
* @param node - 触发节点的时间、内容与来源。
|
|
119
|
+
* @returns 字段齐备的目标轮次,或 null(调用方渲染等价外壳)。
|
|
120
|
+
*/
|
|
121
|
+
export declare function goalRoundOf(node: Pick<TriggerNodeLike, 'content' | 'source'>): GoalRound | null;
|
|
122
|
+
/**
|
|
123
|
+
* 紧凑的本地时间戳 —— 复刻 ui-chat 的 `formatMessageClock`。
|
|
124
|
+
*
|
|
125
|
+
* 跨插件不能 import 它的值(client bundle 的 purity gate 禁止 feature plugin
|
|
126
|
+
* 之间做运行时 import),所以这份实现与它同源:同一天只给 `HH:mm`,同年补上
|
|
127
|
+
* `clock.md` 的日期模板,跨年用 `clock.ymd`。日期模板仍从调用方的 locale
|
|
128
|
+
* seat 取,插件不自带文案。
|
|
129
|
+
* @param time - 记录时间(Unix epoch ms)。
|
|
130
|
+
* @param t - 提供 `clock.md` / `clock.ymd` 模板的翻译席位。
|
|
131
|
+
* @param now - 判定「今天 / 今年」的参照时刻。
|
|
132
|
+
* @returns 与官方卡片一致的时钟串。
|
|
133
|
+
*/
|
|
134
|
+
export declare function formatClock(time: number, t: TriggerTranslate, now?: number): string;
|
|
135
|
+
//# sourceMappingURL=trigger-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger-model.d.ts","sourceRoot":"","sources":["../../../src/client/trigger-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAC/B,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAA;CAChE;AAED,8DAA8D;AAC9D,MAAM,MAAM,WAAW,GACnB,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAA;AAE7G,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,mCAAmC;AACnC,MAAM,WAAW,eAAe;IAC9B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB;IAChB,MAAM,EAAE,OAAO,CAAA;CAChB;AAED,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAA;AAE3F;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,IAAI,CAQjE;AASD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CASzD;AAaD,sCAAsC;AACtC,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,WAAW,CAAA;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,cAAc,CA0BlE;AAED,yBAAyB;AACzB,MAAM,WAAW,SAAS;IACxB,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,YAAY;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;CACpB;AAWD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAsB7D;AAeD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,QAAQ,CAAC,GAAG,SAAS,GAAG,IAAI,CAO/F;AAOD;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,gBAAgB,EAAE,GAAG,GAAE,MAAmB,GAAG,MAAM,CAgB/F"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export interface NodeAppearanceColors {
|
|
|
24
24
|
command: string;
|
|
25
25
|
thinking: string;
|
|
26
26
|
context: string;
|
|
27
|
+
summary: string;
|
|
27
28
|
steering: string;
|
|
28
29
|
other: string;
|
|
29
30
|
}
|
|
@@ -61,6 +62,7 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
61
62
|
command: z<string, string, "defined">;
|
|
62
63
|
thinking: z<string, string, "defined">;
|
|
63
64
|
context: z<string, string, "defined">;
|
|
65
|
+
summary: z<string, string, "defined">;
|
|
64
66
|
steering: z<string, string, "defined">;
|
|
65
67
|
other: z<string, string, "defined">;
|
|
66
68
|
}>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
|
|
@@ -74,6 +76,7 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
74
76
|
command: z<string, string, "defined">;
|
|
75
77
|
thinking: z<string, string, "defined">;
|
|
76
78
|
context: z<string, string, "defined">;
|
|
79
|
+
summary: z<string, string, "defined">;
|
|
77
80
|
steering: z<string, string, "defined">;
|
|
78
81
|
other: z<string, string, "defined">;
|
|
79
82
|
}>>>, "volatile-defined">;
|
|
@@ -91,6 +94,7 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
91
94
|
command: z<string, string, "defined">;
|
|
92
95
|
thinking: z<string, string, "defined">;
|
|
93
96
|
context: z<string, string, "defined">;
|
|
97
|
+
summary: z<string, string, "defined">;
|
|
94
98
|
steering: z<string, string, "defined">;
|
|
95
99
|
other: z<string, string, "defined">;
|
|
96
100
|
}>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
|
|
@@ -104,6 +108,7 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
104
108
|
command: z<string, string, "defined">;
|
|
105
109
|
thinking: z<string, string, "defined">;
|
|
106
110
|
context: z<string, string, "defined">;
|
|
111
|
+
summary: z<string, string, "defined">;
|
|
107
112
|
steering: z<string, string, "defined">;
|
|
108
113
|
other: z<string, string, "defined">;
|
|
109
114
|
}>>>, "volatile-defined">;
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAK5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,eAAO,MAAM,IAAI,wBAAwB,CAAA;AAEzC;;sDAEsD;AACtD,eAAO,MAAM,kBAAkB,oBAAoB,CAAA;AAEnD,8CAA8C;AAC9C,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;;sCAUsC;AACtC,MAAM,WAAW,MAAM;IACrB,uFAAuF;IACvF,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC/B,kCAAkC;IAClC,MAAM,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAA;IACtC,yDAAyD;IACzD,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;CACnC;AAED,kFAAkF;AAClF,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;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
|
2
2
|
"name": "@max-null/dsh-node-appearance",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.7.1",
|
|
4
|
+
"description": "会话节点外观插件:节点/工具分类着色(可配置)、折叠摘要条按类别取色、触发通知卡字段化(接管 turn-trigger)、提问卡展示全部选项、交付文件清单展开、目标详情折叠条、思考过程显示开关(DeepSeek Harness Web GUI)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
73
|
-
"@deepseek-ai/dsh-client-ui-primitives": "
|
|
74
|
-
"@deepseek-ai/dsh-client-ui-settings": "
|
|
75
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": "
|
|
76
|
-
"@deepseek-ai/dsh-client-ui-slots": "
|
|
77
|
-
"@deepseek-ai/dsh-settings": "
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.1.7-rc.2 <0.3.0",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.7-rc.2 <0.3.0",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.1.7-rc.2 <0.3.0",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-rc.2 <0.3.0",
|
|
77
|
+
"@deepseek-ai/dsh-settings": ">=0.1.7-rc.2 <0.3.0",
|
|
78
78
|
"react": "^18.2.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|