dsh-claude-desktop-theme 0.4.1 → 0.4.2
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 +4 -2
- package/lib/client.js +788 -36
- package/lib/index.js +7 -1
- package/lib/types/client/compat/hero-canvas.d.ts +4 -0
- package/lib/types/client/compat/host-dom.d.ts +2 -0
- package/lib/types/client/compat/slots.d.ts +2 -0
- package/lib/types/client/compat/status-groups.d.ts +19 -0
- package/lib/types/client/contracts/hero-canvas.d.ts +7 -0
- package/lib/types/client/features/conversation/header-actions/visibility.d.ts +5 -0
- package/lib/types/client/features/new-session/index.d.ts +2 -3
- package/lib/types/client/features/new-session/ripples.d.ts +8 -0
- package/lib/types/client/features/settings/locales.d.ts +4 -0
- package/lib/types/client/features/view-options/ViewOptionsCard.d.ts +6 -3
- package/lib/types/client/features/view-options/mount.d.ts +2 -2
- package/lib/types/host/index.d.ts +12 -0
- package/lib/types/shared/config.d.ts +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -23,7 +23,10 @@ var DEFAULT_FONTS = Object.freeze({
|
|
|
23
23
|
code: ""
|
|
24
24
|
});
|
|
25
25
|
var DEFAULT_VIEW = Object.freeze({
|
|
26
|
-
showEmptyGroups: false
|
|
26
|
+
showEmptyGroups: false,
|
|
27
|
+
groupByStatus: false,
|
|
28
|
+
showHeaderSubagents: false,
|
|
29
|
+
showHeaderTeam: false
|
|
27
30
|
});
|
|
28
31
|
var FONT_NAME_MAX_LENGTH = 64;
|
|
29
32
|
|
|
@@ -1008,6 +1011,9 @@ var Config = z.object({
|
|
|
1008
1011
|
code: z.string().default(DEFAULT_FONTS.code).description("\u4EE3\u7801\u4E0E\u7B49\u5BBD\u5B57\u4F53\u540D\uFF08\u7559\u7A7A\u7528\u7CFB\u7EDF\u6808\uFF09").pattern(FONT_NAME)
|
|
1009
1012
|
}).default({ ...DEFAULT_FONTS }).description("\u5B57\u4F53").volatile(),
|
|
1010
1013
|
view: z.object({
|
|
1014
|
+
showHeaderSubagents: z.boolean().default(DEFAULT_VIEW.showHeaderSubagents).description("\u663E\u793A\u9876\u680F\u5B50\u4EE3\u7406\u5165\u53E3\uFF08\u4EC5\u63A7\u5236\u5165\u53E3\u663E\u793A\uFF09"),
|
|
1015
|
+
showHeaderTeam: z.boolean().default(DEFAULT_VIEW.showHeaderTeam).description("\u663E\u793A\u9876\u680F\u56E2\u961F\u5165\u53E3\uFF08\u4EC5\u63A7\u5236\u5165\u53E3\u663E\u793A\uFF09"),
|
|
1016
|
+
groupByStatus: z.boolean().default(DEFAULT_VIEW.groupByStatus).description("\u6309\u4F1A\u8BDD\u72B6\u6001\u5206\u7EC4\uFF08\u4FDD\u7559\u539F\u751F\u9879\u76EE\u89C6\u56FE\u9009\u9879\uFF09"),
|
|
1011
1017
|
showEmptyGroups: z.boolean().default(DEFAULT_VIEW.showEmptyGroups).description("\u663E\u793A\u7A7A\u5206\u7EC4\uFF08\u5173\u6389\u65F6\u6CA1\u6709\u4F1A\u8BDD\u7684\u5DE5\u4F5C\u533A\u4E0D\u518D\u663E\u793A\uFF09")
|
|
1012
1018
|
}).default({ ...DEFAULT_VIEW }).description("\u89C6\u56FE\u9009\u9879").volatile()
|
|
1013
1019
|
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Disposer } from '../contracts/ports.ts';
|
|
2
|
+
import type { HeroRippleImpulse } from '../contracts/hero-canvas.ts';
|
|
3
|
+
/** One decorative canvas per visible hero; no timers survive its phase change. */
|
|
4
|
+
export declare function mountHeroCanvas(document: Document, draw: (canvas: HTMLCanvasElement, elapsed: number, impulses: readonly HeroRippleImpulse[]) => void, report: (error: unknown) => void): Disposer;
|
|
@@ -161,6 +161,8 @@ export declare const HOST: Readonly<{
|
|
|
161
161
|
/** WorkspaceBrowser.module.css: the tree's own scroller — the one element
|
|
162
162
|
whose scroll distance the parked header band follows. */
|
|
163
163
|
readonly browserList: '._7514NG_list';
|
|
164
|
+
/** FlatList is the only native body the status presentation reorders. */
|
|
165
|
+
readonly browserFlatList: '._7514NG_flatList';
|
|
164
166
|
/** Rows.module.css: one Workspace's row, the line the merged header shares,
|
|
165
167
|
and its trailing action group (`sidebar.css` parks both). */
|
|
166
168
|
readonly workspaceRow: '.jJkEga_projectRow';
|
|
@@ -7,6 +7,8 @@ export declare const DSH_SLOTS: Readonly<{
|
|
|
7
7
|
readonly conversation: 'main.conversation';
|
|
8
8
|
readonly header: 'conversation.header';
|
|
9
9
|
readonly sessionHeader: 'conversation.session.header';
|
|
10
|
+
/** Native subagent-catalog and agent-team entries occupy this list. */
|
|
11
|
+
readonly sessionHeaderActions: 'conversation.session.header.actions';
|
|
10
12
|
/** Trailing header seats: `utilities` is a list the native actions occupy too. */
|
|
11
13
|
readonly sessionHeaderUtilities: 'conversation.session.header.utilities';
|
|
12
14
|
readonly sessionHeaderCorner: 'conversation.session.header.corner';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { Disposer } from '../contracts/ports.ts';
|
|
3
|
+
export type SessionGroup = 'input' | 'working' | 'ended';
|
|
4
|
+
export interface SessionStatus {
|
|
5
|
+
readonly running?: boolean;
|
|
6
|
+
readonly pendingInteraction?: {
|
|
7
|
+
readonly kind: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/** Pending interaction takes precedence over live work, as in DSH's own rows. */
|
|
11
|
+
export declare function sessionGroup(status: SessionStatus | undefined, running: boolean): SessionGroup;
|
|
12
|
+
/**
|
|
13
|
+
* Present the host's flat rows in status sections. React-owned rows never leave
|
|
14
|
+
* their parents: flex order and reading-flow supply visual and accessible order.
|
|
15
|
+
* Native selection, hover cards, menus and rename handlers remain on those rows.
|
|
16
|
+
* uiSession.sessionStatus is the root observable provided by ui-session in the
|
|
17
|
+
* pinned app.asar; it does not acquire or activate any listed Session.
|
|
18
|
+
*/
|
|
19
|
+
export declare function mountStatusGroups(document: Document, ctx: Context, showEmpty: boolean, report: (error: unknown) => void): Disposer;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ViewConfig } from '../../../../shared/config.ts';
|
|
2
|
+
import type { HostServices } from '../../../contracts/ports.ts';
|
|
3
|
+
import type { CleanupScope } from '../../../core/cleanup.ts';
|
|
4
|
+
/** Shadow a hidden entry with an empty renderer; releasing it restores DSH's. */
|
|
5
|
+
export declare function mountHeaderVisibility(slots: HostServices['slots'], view: Pick<ViewConfig, 'showHeaderSubagents' | 'showHeaderTeam'>, cleanup: CleanupScope): void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ImplementedFeature } from '../../contracts/feature.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Blank-session page. DSH renders the Conversation shell in its `hero` phase
|
|
4
|
-
* here
|
|
5
|
-
*
|
|
6
|
-
* phase transition itself to the host.
|
|
4
|
+
* here. This module lays out the greeting and Composer and mounts a decorative
|
|
5
|
+
* ASCII ripple field; the phase transition itself belongs to the host.
|
|
7
6
|
*/
|
|
8
7
|
export declare const newSessionFeature: ImplementedFeature;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HeroRippleImpulse } from '../../contracts/hero-canvas.ts';
|
|
2
|
+
/** One character's stable grain and time-varying light, before the edge fade. */
|
|
3
|
+
export declare function rippleCell(x: number, y: number, elapsed: number, width: number, height: number, impulses?: readonly HeroRippleImpulse[]): {
|
|
4
|
+
alpha: number;
|
|
5
|
+
glyph: string;
|
|
6
|
+
};
|
|
7
|
+
/** Stationary ASCII rows lit by an autonomous, slowly swelling wave field. */
|
|
8
|
+
export declare function drawHeroRipples(canvas: HTMLCanvasElement, elapsed: number, impulses?: readonly HeroRippleImpulse[]): void;
|
|
@@ -16,6 +16,10 @@ export declare const zh: {
|
|
|
16
16
|
readonly 'section.appearance': '外观';
|
|
17
17
|
readonly 'section.fonts': '字体';
|
|
18
18
|
readonly 'section.view': '视图';
|
|
19
|
+
readonly 'field.showHeaderSubagents': '显示顶栏子代理入口';
|
|
20
|
+
readonly 'hint.showHeaderSubagents': '显示会话顶栏的子代理数量与列表入口,默认关闭;子代理运行与侧栏树不受影响';
|
|
21
|
+
readonly 'field.showHeaderTeam': '显示顶栏团队入口';
|
|
22
|
+
readonly 'hint.showHeaderTeam': '显示会话顶栏的智能体团队入口,默认关闭;团队功能不受影响';
|
|
19
23
|
readonly 'field.showEmptyGroups': '显示空分组';
|
|
20
24
|
readonly 'hint.showEmptyGroups': '关掉时没有会话的工作区不再显示;视图选项菜单里的同一项';
|
|
21
25
|
readonly 'field.enabled': '启用 CCD 风格界面';
|
|
@@ -2,6 +2,8 @@ import type { ReactElement } from 'react';
|
|
|
2
2
|
import type { ViewOptionsPort } from '../../contracts/ports.ts';
|
|
3
3
|
export interface ViewOptionsCardProps {
|
|
4
4
|
readonly port: ViewOptionsPort;
|
|
5
|
+
readonly groupByStatus?: boolean;
|
|
6
|
+
readonly setGroupByStatus?: (value: boolean) => void;
|
|
5
7
|
/** `view.showEmptyGroups`: whether empty Workspaces are kept on screen. */
|
|
6
8
|
readonly showEmptyGroups: boolean;
|
|
7
9
|
/** Write the switch back through the settings transport. */
|
|
@@ -21,10 +23,11 @@ export interface ViewOptionsCardProps {
|
|
|
21
23
|
* out of the host's card and renames only the archived-visibility triple, which
|
|
22
24
|
* is the one set the reference names differently (活跃 / 已归档 / 全部).
|
|
23
25
|
*
|
|
24
|
-
*
|
|
25
|
-
* `view.showEmptyGroups` through the settings
|
|
26
|
+
* The empty-group switch and status grouping mode are this plugin's own state:
|
|
27
|
+
* they write `view.showEmptyGroups` / `view.groupByStatus` through the settings
|
|
28
|
+
* transport, and a write re-mounts
|
|
26
29
|
* the plugin, so the card closes behind it. `清除筛选` puts the filter rows back
|
|
27
30
|
* to their defaults and exists only while one of them is off its default, which
|
|
28
31
|
* is what the reference does with `Clear filters`.
|
|
29
32
|
*/
|
|
30
|
-
export declare function ViewOptionsCard({ port, showEmptyGroups, setShowEmptyGroups, }: ViewOptionsCardProps): ReactElement | null;
|
|
33
|
+
export declare function ViewOptionsCard({ port, showEmptyGroups, setShowEmptyGroups, groupByStatus, setGroupByStatus, }: ViewOptionsCardProps): ReactElement | null;
|
|
@@ -7,8 +7,8 @@ import type { ViewOptionsSettingsPort } from '../../contracts/ports.ts';
|
|
|
7
7
|
*
|
|
8
8
|
* The card is this plugin's own surface, so it is registered like one: a React
|
|
9
9
|
* entry in `shell.overlay`, holding the driver that watches the host's trigger
|
|
10
|
-
* and drives the host's own menu (`compat/view-options.ts`).
|
|
11
|
-
*
|
|
10
|
+
* and drives the host's own menu (`compat/view-options.ts`). Its own values,
|
|
11
|
+
* `view.showEmptyGroups` and `view.groupByStatus`, go through the settings
|
|
12
12
|
* transport the same way the configuration page writes its fields — a write
|
|
13
13
|
* re-mounts the plugin, which is why the card closes behind the switch.
|
|
14
14
|
*
|
|
@@ -54,8 +54,14 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
54
54
|
code: z<string, string, "defined">;
|
|
55
55
|
}>>>, "volatile-defined">;
|
|
56
56
|
view: z<NoInfer<Schemastery.ObjectS<NoInfer<{
|
|
57
|
+
showHeaderSubagents: z<boolean, boolean, "defined">;
|
|
58
|
+
showHeaderTeam: z<boolean, boolean, "defined">;
|
|
59
|
+
groupByStatus: z<boolean, boolean, "defined">;
|
|
57
60
|
showEmptyGroups: z<boolean, boolean, "defined">;
|
|
58
61
|
}>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
|
|
62
|
+
showHeaderSubagents: z<boolean, boolean, "defined">;
|
|
63
|
+
showHeaderTeam: z<boolean, boolean, "defined">;
|
|
64
|
+
groupByStatus: z<boolean, boolean, "defined">;
|
|
59
65
|
showEmptyGroups: z<boolean, boolean, "defined">;
|
|
60
66
|
}>>>, "volatile-defined">;
|
|
61
67
|
}>>, Schemastery.ObjectT<NoInfer<{
|
|
@@ -99,8 +105,14 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
99
105
|
code: z<string, string, "defined">;
|
|
100
106
|
}>>>, "volatile-defined">;
|
|
101
107
|
view: z<NoInfer<Schemastery.ObjectS<NoInfer<{
|
|
108
|
+
showHeaderSubagents: z<boolean, boolean, "defined">;
|
|
109
|
+
showHeaderTeam: z<boolean, boolean, "defined">;
|
|
110
|
+
groupByStatus: z<boolean, boolean, "defined">;
|
|
102
111
|
showEmptyGroups: z<boolean, boolean, "defined">;
|
|
103
112
|
}>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
|
|
113
|
+
showHeaderSubagents: z<boolean, boolean, "defined">;
|
|
114
|
+
showHeaderTeam: z<boolean, boolean, "defined">;
|
|
115
|
+
groupByStatus: z<boolean, boolean, "defined">;
|
|
104
116
|
showEmptyGroups: z<boolean, boolean, "defined">;
|
|
105
117
|
}>>>, "volatile-defined">;
|
|
106
118
|
}>>, "plain">;
|
|
@@ -16,7 +16,7 @@ export declare const APPEARANCE_FIELDS: readonly ['canvas', 'sidebar'];
|
|
|
16
16
|
/** Fields of the typeface section; an empty string means "system stack". */
|
|
17
17
|
export declare const FONT_FIELDS: readonly ['uiLatin', 'uiCjk', 'code'];
|
|
18
18
|
/** Fields of the view-options section. */
|
|
19
|
-
export declare const VIEW_FIELDS: readonly ['showEmptyGroups'];
|
|
19
|
+
export declare const VIEW_FIELDS: readonly ['showEmptyGroups', 'groupByStatus', 'showHeaderSubagents', 'showHeaderTeam'];
|
|
20
20
|
export type AppearanceField = typeof APPEARANCE_FIELDS[number];
|
|
21
21
|
export type FontField = typeof FONT_FIELDS[number];
|
|
22
22
|
export type ViewField = typeof VIEW_FIELDS[number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-claude-desktop-theme",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Claude Code Desktop-style theme for DeepSeek Harness (DSH) Desktop on macOS and Windows, with light/dark themes, model/effort pickers and an interactive pixel whale",
|
|
6
6
|
"author": "zkforge",
|