@lincyaw/dsh 0.2.0-rc.23 → 0.2.0-rc.25

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.
@@ -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",
@@ -50,6 +45,7 @@
50
45
  "../kernel/src/contracts/projects.ts",
51
46
  "../kernel/src/contracts/document-image.ts",
52
47
  "../kernel/src/contracts.ts",
48
+ "../kernel/src/random-uuid.ts",
53
49
  "../kernel/src/document-operations.ts",
54
50
  "../kernel/src/document-schema.ts",
55
51
  "../kernel/src/authoring.ts",
@@ -165,10 +161,6 @@
165
161
  "../workbench/src/panels/ExportPanel.tsx",
166
162
  "../workbench/src/panels/HistoryPanel.tsx",
167
163
  "../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
164
  "../workbench/src/panels/PreviewPanel.tsx",
173
165
  "../workbench/src/document-editor/blocknote-messages.ts",
174
166
  "../workbench/src/document-editor/colors.ts",
@@ -180,6 +172,8 @@
180
172
  "../workbench/src/document-editor/clipboard.ts",
181
173
  "../workbench/src/document-editor/page-body.ts",
182
174
  "../workbench/src/document-editor/authoring.tsx",
175
+ "../workbench/src/document-editor/inline.ts",
176
+ "../workbench/src/document-editor/rich-text.ts",
183
177
  "../workbench/src/document-editor/comments.ts",
184
178
  "../workbench/src/document-editor/DocumentComments.tsx",
185
179
  "../workbench/src/document-editor/NewCommentDrafts.tsx",
@@ -219,6 +213,7 @@
219
213
  "../workbench/src/panels/ProductionPanel.tsx",
220
214
  "../workbench/src/panels/PageRenameDialog.tsx",
221
215
  "../workbench/src/panels/PageDeleteDialog.tsx",
216
+ "../workbench/src/document-editor/projection.ts",
222
217
  "../workbench/src/document-editor/insertion-place.ts",
223
218
  "../workbench/src/document-editor/DocumentEditor.tsx",
224
219
  "../workbench/src/document-editor/block-preview-messages.ts",
@@ -233,7 +228,6 @@
233
228
  "../workbench/src/panels/DocumentView.tsx",
234
229
  "../workbench/src/panels/HomePanel.tsx",
235
230
  "../workbench/src/approvals.tsx",
236
- "../workbench/src/assistant-mascot.ts",
237
231
  "../workbench/src/speech-settings-messages.ts",
238
232
  "../workbench/src/panels/SpeechSettingsPanel.tsx",
239
233
  "../workbench/src/authoring-client.ts",
@@ -246,7 +240,6 @@
246
240
  "src/client/settings-opener.ts",
247
241
  "src/client/messages.ts",
248
242
  "src/client/brand.tsx",
249
- "src/client/mascot.tsx",
250
243
  "src/client/document-context.ts",
251
244
  "src/client/observable.ts",
252
245
  "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.23",
3
+ "version": "0.2.0-rc.25",
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/kernel": "1.0.0-rc.24",
88
- "@lincyaw/skills": "1.0.0-rc.24",
89
- "@lincyaw/mcp": "1.0.0-rc.24",
90
- "@lincyaw/cli": "1.0.0-rc.24"
87
+ "@lincyaw/kernel": "1.0.0-rc.26",
88
+ "@lincyaw/skills": "1.0.0-rc.26",
89
+ "@lincyaw/cli": "1.0.0-rc.26",
90
+ "@lincyaw/mcp": "1.0.0-rc.26"
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.23",
107
- "@lincyaw/design": "1.0.0-rc.24"
106
+ "@lincyaw/design": "1.0.0-rc.26",
107
+ "@lincyaw/workbench": "0.2.0-rc.25"
108
108
  },
109
109
  "scripts": {}
110
110
  }
@@ -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,
@@ -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,
@@ -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: {
@@ -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
- }
@@ -37,6 +37,12 @@ export function apply(ctx: DshContext): void {
37
37
  const value = request.headers.get(name)
38
38
  if (value !== null) headers[name] = value
39
39
  }
40
+ if (path === 'preview') {
41
+ const browser = new URL(request.url)
42
+ const host = request.headers.get('host')
43
+ if (host) browser.host = host
44
+ headers['x-presmium-preview-origin'] = browser.origin
45
+ }
40
46
  const upstream = await ctx.presmium.server.request(`${target}${new URL(request.url).search}`, {
41
47
  method: request.method,
42
48
  headers,
@@ -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
- }