@lincyaw/dsh 0.2.0-rc.23 → 0.2.0-rc.24
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/build/client.mjs +0 -2
- package/build/dist/client.js +193 -193
- package/build/dist/client.json +3 -11
- package/package.json +7 -7
- package/src/client/contract.ts +0 -6
- package/src/client/index.tsx +0 -2
- package/src/client/messages.ts +0 -8
- package/src/client/styles.css +0 -42
- package/src/client/mascot.tsx +0 -37
package/build/dist/client.json
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"inputs": [
|
|
3
|
-
"../design/src/assets/mascot/cat.png",
|
|
4
|
-
"../design/src/assets/mascot/cat-light.png",
|
|
5
|
-
"../design/src/assets/mascot/sheet.ts",
|
|
6
|
-
"../design/src/assets/mascot.ts",
|
|
7
3
|
"../design/src/icons.ts",
|
|
8
4
|
"../design/src/tokens.ts",
|
|
9
5
|
"../design/src/assets/brand.ts",
|
|
10
6
|
"../design/src/index.ts",
|
|
11
7
|
"../workbench/src/base-controls.tsx",
|
|
12
|
-
"../workbench/src/mascot-preference.ts",
|
|
13
8
|
"../workbench/src/sortable-list.tsx",
|
|
14
9
|
"../workbench/src/components.tsx",
|
|
15
10
|
"../kernel/src/contracts/service.ts",
|
|
@@ -165,10 +160,6 @@
|
|
|
165
160
|
"../workbench/src/panels/ExportPanel.tsx",
|
|
166
161
|
"../workbench/src/panels/HistoryPanel.tsx",
|
|
167
162
|
"../workbench/src/preview-pool.ts",
|
|
168
|
-
"../workbench/src/document-editor/inline.ts",
|
|
169
|
-
"../workbench/src/document-editor/rich-text.ts",
|
|
170
|
-
"../workbench/src/document-editor/projection.ts",
|
|
171
|
-
"../workbench/src/panels/ChangeTrail.tsx",
|
|
172
163
|
"../workbench/src/panels/PreviewPanel.tsx",
|
|
173
164
|
"../workbench/src/document-editor/blocknote-messages.ts",
|
|
174
165
|
"../workbench/src/document-editor/colors.ts",
|
|
@@ -180,6 +171,8 @@
|
|
|
180
171
|
"../workbench/src/document-editor/clipboard.ts",
|
|
181
172
|
"../workbench/src/document-editor/page-body.ts",
|
|
182
173
|
"../workbench/src/document-editor/authoring.tsx",
|
|
174
|
+
"../workbench/src/document-editor/inline.ts",
|
|
175
|
+
"../workbench/src/document-editor/rich-text.ts",
|
|
183
176
|
"../workbench/src/document-editor/comments.ts",
|
|
184
177
|
"../workbench/src/document-editor/DocumentComments.tsx",
|
|
185
178
|
"../workbench/src/document-editor/NewCommentDrafts.tsx",
|
|
@@ -219,6 +212,7 @@
|
|
|
219
212
|
"../workbench/src/panels/ProductionPanel.tsx",
|
|
220
213
|
"../workbench/src/panels/PageRenameDialog.tsx",
|
|
221
214
|
"../workbench/src/panels/PageDeleteDialog.tsx",
|
|
215
|
+
"../workbench/src/document-editor/projection.ts",
|
|
222
216
|
"../workbench/src/document-editor/insertion-place.ts",
|
|
223
217
|
"../workbench/src/document-editor/DocumentEditor.tsx",
|
|
224
218
|
"../workbench/src/document-editor/block-preview-messages.ts",
|
|
@@ -233,7 +227,6 @@
|
|
|
233
227
|
"../workbench/src/panels/DocumentView.tsx",
|
|
234
228
|
"../workbench/src/panels/HomePanel.tsx",
|
|
235
229
|
"../workbench/src/approvals.tsx",
|
|
236
|
-
"../workbench/src/assistant-mascot.ts",
|
|
237
230
|
"../workbench/src/speech-settings-messages.ts",
|
|
238
231
|
"../workbench/src/panels/SpeechSettingsPanel.tsx",
|
|
239
232
|
"../workbench/src/authoring-client.ts",
|
|
@@ -246,7 +239,6 @@
|
|
|
246
239
|
"src/client/settings-opener.ts",
|
|
247
240
|
"src/client/messages.ts",
|
|
248
241
|
"src/client/brand.tsx",
|
|
249
|
-
"src/client/mascot.tsx",
|
|
250
242
|
"src/client/document-context.ts",
|
|
251
243
|
"src/client/observable.ts",
|
|
252
244
|
"src/client/runtime-diagnostics.tsx",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lincyaw/dsh",
|
|
3
|
-
"version": "0.2.0-rc.
|
|
3
|
+
"version": "0.2.0-rc.24",
|
|
4
4
|
"description": "Presmium's bundle for DeepSeek Harness: the workbench of presmium studio, its host side (Presmium's tools, approvals, document context, skills and routes) and its client side (the root layout and the workbench's panels, precompiled) (experimental)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"jiti": "^2.7.0",
|
|
85
85
|
"ws": "8.22.0",
|
|
86
86
|
"zod": "4.4.3",
|
|
87
|
-
"@lincyaw/
|
|
88
|
-
"@lincyaw/
|
|
89
|
-
"@lincyaw/
|
|
90
|
-
"@lincyaw/
|
|
87
|
+
"@lincyaw/cli": "1.0.0-rc.25",
|
|
88
|
+
"@lincyaw/mcp": "1.0.0-rc.25",
|
|
89
|
+
"@lincyaw/skills": "1.0.0-rc.25",
|
|
90
|
+
"@lincyaw/kernel": "1.0.0-rc.25"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"@deepseek-ai/dsh": "0.2.1-alpha.4"
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
"react": "18.3.1",
|
|
104
104
|
"react-dom": "18.3.1",
|
|
105
105
|
"react-resizable-panels": "^4.14.5",
|
|
106
|
-
"@lincyaw/workbench": "0.2.0-rc.
|
|
107
|
-
"@lincyaw/design": "1.0.0-rc.
|
|
106
|
+
"@lincyaw/workbench": "0.2.0-rc.24",
|
|
107
|
+
"@lincyaw/design": "1.0.0-rc.25"
|
|
108
108
|
},
|
|
109
109
|
"scripts": {}
|
|
110
110
|
}
|
package/src/client/contract.ts
CHANGED
|
@@ -23,12 +23,6 @@ export const ONBOARDING = { slot: 'settings.onboarding', steps: ['welcome-notice
|
|
|
23
23
|
*/
|
|
24
24
|
export const ASSISTANT_SLOTS = ['conversation.composer', { name: 'conversation.chat.node', key: 'turn-error' }] as const
|
|
25
25
|
|
|
26
|
-
/** Where the kitten sits beside the conversation: an added entry (its own id) among the session header's actions. */
|
|
27
|
-
export const MASCOT_SLOT = { name: 'conversation.session.header.actions', id: 'presmium-mascot' } as const
|
|
28
|
-
|
|
29
|
-
/** Where the author turns the kitten on or off: an added row (its own id) in Settings → General. */
|
|
30
|
-
export const MASCOT_SETTING = { name: 'settings.general.item', id: 'presmium-mascot' } as const
|
|
31
|
-
|
|
32
26
|
/**
|
|
33
27
|
* Settings → Models, and when the model catalog is read again: on the Host's events that change what can be routed,
|
|
34
28
|
* whenever the window regains focus, and on a slow poll while no model is usable (Settings is a modal over this page,
|
package/src/client/index.tsx
CHANGED
|
@@ -5,7 +5,6 @@ import { registerAuthorSettings } from './author-settings.ts'
|
|
|
5
5
|
import { registerSpeechSettings } from './speech-settings.tsx'
|
|
6
6
|
import { openSpeechSettings } from './settings-opener.ts'
|
|
7
7
|
import { registerBrand } from './brand.tsx'
|
|
8
|
-
import { registerMascot } from './mascot.tsx'
|
|
9
8
|
import { CLIENT_ID, isBootEntryLoaded, ROOT_CHILDREN, UI_LAYOUT, UI_SIDEBAR } from './contract.ts'
|
|
10
9
|
import { syncDocumentContext } from './document-context.ts'
|
|
11
10
|
import { FALLBACK_PANEL, registerFallbackLayout } from './fallback.tsx'
|
|
@@ -148,7 +147,6 @@ export function apply(ctx: DshClientContext): void {
|
|
|
148
147
|
}, 'presmium: the root layout and ctx.layout')
|
|
149
148
|
}
|
|
150
149
|
registerBrand(ctx, workbench)
|
|
151
|
-
registerMascot(ctx, workbench)
|
|
152
150
|
registerAuthorSettings(ctx)
|
|
153
151
|
registerSpeechSettings(ctx, workbench)
|
|
154
152
|
ctx.inject(['layout'], inner => inner.effect(() => connectLaunchTarget(workbench,
|
package/src/client/messages.ts
CHANGED
|
@@ -18,10 +18,6 @@ const zh = {
|
|
|
18
18
|
history: '版本历史',
|
|
19
19
|
settings: '设置',
|
|
20
20
|
help: '帮助',
|
|
21
|
-
mascot: '小猫',
|
|
22
|
-
mascotHint: 'AI 助手工作时,对话和文稿旁的小猫会演示它在做什么:思考、阅读、修改或等你确认。',
|
|
23
|
-
mascotShow: '显示',
|
|
24
|
-
mascotHide: '隐藏',
|
|
25
21
|
close: '关闭',
|
|
26
22
|
toggleSide: '显示或隐藏对话记录',
|
|
27
23
|
keys: {
|
|
@@ -94,10 +90,6 @@ const en: ClientMessages = {
|
|
|
94
90
|
history: 'Version History',
|
|
95
91
|
settings: 'Settings',
|
|
96
92
|
help: 'Help',
|
|
97
|
-
mascot: 'Kitten',
|
|
98
|
-
mascotHint: 'While the AI Assistant works, a kitten beside the chat and the document acts out what it is doing: thinking, reading, changing the document, or waiting for you.',
|
|
99
|
-
mascotShow: 'Show',
|
|
100
|
-
mascotHide: 'Hide',
|
|
101
93
|
close: 'Close',
|
|
102
94
|
toggleSide: 'Show or Hide Chat History',
|
|
103
95
|
keys: {
|
package/src/client/styles.css
CHANGED
|
@@ -1,45 +1,3 @@
|
|
|
1
1
|
@import '@lincyaw/design/design.css';
|
|
2
2
|
@import '@lincyaw/workbench/styles.css';
|
|
3
3
|
@import './frame.css';
|
|
4
|
-
|
|
5
|
-
/* The kitten among the conversation header's actions. */
|
|
6
|
-
.pmw-conversation-mascot {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* The kitten's row in Settings → General, laid out as Harness's own rows: its name and note, then its choice. */
|
|
12
|
-
.pmw-mascot-setting {
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: space-between;
|
|
16
|
-
gap: var(--pm-space-4);
|
|
17
|
-
padding-block: var(--pm-space-4);
|
|
18
|
-
border-top: var(--pm-size-hairline) solid var(--pm-color-line);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.pmw-mascot-setting__copy {
|
|
22
|
-
display: grid;
|
|
23
|
-
gap: var(--pm-space-1);
|
|
24
|
-
min-width: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.pmw-mascot-setting__title {
|
|
28
|
-
margin: 0;
|
|
29
|
-
color: var(--pm-color-ink);
|
|
30
|
-
font-size: var(--pm-text-sm);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.pmw-mascot-setting__hint {
|
|
34
|
-
margin: 0;
|
|
35
|
-
color: var(--pm-color-muted);
|
|
36
|
-
font-size: var(--pm-text-xs);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.pmw-mascot-setting .pm-ui-segmented {
|
|
40
|
-
flex: none;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@media (max-width: 767px) {
|
|
44
|
-
.pmw-mascot-setting { flex-wrap: wrap; }
|
|
45
|
-
}
|
package/src/client/mascot.tsx
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { PmMascot, PmSegmented, setMascotEnabled, useAssistantMascot, useMascotEnabled, WorkbenchProvider } from '@lincyaw/workbench'
|
|
2
|
-
import type { Workbench } from '@lincyaw/workbench'
|
|
3
|
-
import { MASCOT_SETTING, MASCOT_SLOT } from './contract.ts'
|
|
4
|
-
import { useClientMessages } from './messages.ts'
|
|
5
|
-
|
|
6
|
-
/** The session header's standard prop: a selector over the bound session's snapshot. */
|
|
7
|
-
type UseSession = <T>(select: (snapshot: { running?: boolean }) => T) => T
|
|
8
|
-
|
|
9
|
-
function Kitten({ running }: { running: boolean }) {
|
|
10
|
-
return <span className="pmw-conversation-mascot"><PmMascot size="small" action={useAssistantMascot(running)} /></span>
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function MascotSetting({ workbench }: { workbench: Workbench }) {
|
|
14
|
-
const t = useClientMessages(workbench)
|
|
15
|
-
const on = useMascotEnabled()
|
|
16
|
-
return (
|
|
17
|
-
<div className="pmw-mascot-setting pm-ui" data-pmw-setting="mascot">
|
|
18
|
-
<div className="pmw-mascot-setting__copy">
|
|
19
|
-
<p className="pmw-mascot-setting__title">{t.mascot}</p>
|
|
20
|
-
<p className="pmw-mascot-setting__hint">{t.mascotHint}</p>
|
|
21
|
-
</div>
|
|
22
|
-
<PmSegmented label={t.mascot} value={on ? 'show' : 'hide'} options={[{ value: 'show', label: t.mascotShow }, { value: 'hide', label: t.mascotHide }]} onChange={value => setMascotEnabled(value === 'show')} />
|
|
23
|
-
</div>
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** Puts the kitten in the conversation's header, where it acts out what the assistant is doing, and its switch in
|
|
28
|
-
* Settings → General. */
|
|
29
|
-
export function registerMascot(ctx: DshClientContext, workbench: Workbench): void {
|
|
30
|
-
ctx.effect(() => ctx.slots.inject(MASCOT_SLOT.name, () => ctx.slots.register({ name: MASCOT_SLOT.name, id: MASCOT_SLOT.id, order: -100 }, ({ useSession }: { useSession: UseSession }) => {
|
|
31
|
-
const running = useSession(snapshot => Boolean(snapshot.running))
|
|
32
|
-
return <WorkbenchProvider workbench={workbench}><Kitten running={running} /></WorkbenchProvider>
|
|
33
|
-
})), 'presmium: the kitten beside the conversation')
|
|
34
|
-
ctx.effect(() => ctx.slots.inject(MASCOT_SETTING.name, () => ctx.slots.register({ name: MASCOT_SETTING.name, id: MASCOT_SETTING.id, order: 1000 }, () => (
|
|
35
|
-
<WorkbenchProvider workbench={workbench}><MascotSetting workbench={workbench} /></WorkbenchProvider>
|
|
36
|
-
))), 'presmium: the kitten\'s switch in Settings')
|
|
37
|
-
}
|