@lincyaw/workbench 0.2.0-rc.105 → 0.2.0-rc.107

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lincyaw/workbench",
3
- "version": "0.2.0-rc.105",
3
+ "version": "0.2.0-rc.107",
4
4
  "description": "Presmium's workbench panels in React (the documents, a document edited on its rendered page with comments and version history) with the workspace service's client and the preview protocol's workbench side; @lincyaw/dsh places them in presmium studio (experimental)",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -55,8 +55,8 @@
55
55
  "@tiptap/pm": "3.32.0",
56
56
  "katex": "0.18.10",
57
57
  "react-resizable-panels": "4.14.5",
58
- "@lincyaw/design": "1.0.0-rc.105",
59
- "@lincyaw/kernel": "1.0.0-rc.105"
58
+ "@lincyaw/design": "1.0.0-rc.106",
59
+ "@lincyaw/kernel": "1.0.0-rc.106"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "react": "^18.3.1",
@@ -67,6 +67,6 @@
67
67
  "@types/react-dom": "18.3.7",
68
68
  "react": "^18.3.1",
69
69
  "react-dom": "^18.3.1",
70
- "@lincyaw/compiler": "1.0.0-rc.105"
70
+ "@lincyaw/compiler": "1.0.0-rc.106"
71
71
  }
72
72
  }
@@ -9,6 +9,7 @@ const zh = {
9
9
  copyConfig: '复制配置', copyPrompt: '复制提示词', copied: '已复制。',
10
10
  output: '复制内容', manualCopy: '无法自动复制,请从下面的文本框手动复制。',
11
11
  unavailable: '暂时无法读取连接配置,请重试。', retry: '重试', failed: '配置未能应用,当前连接仍可使用。',
12
+ outdatedService: '当前工作区仍在使用旧版后台服务。请将 AI 中的 Presmium 连接更新为桌面应用提供的版本,重新连接后再打开工作区。',
12
13
  portBusy: '该端口无法使用,请选择其他端口,或填 0 自动分配。',
13
14
  conflict: '配置已在其他窗口更新,请重新读取后再修改。', invalid: '请输入 0–65535 的整数端口。',
14
15
  noCommand: '当前服务没有可用的本机启动命令,请使用 HTTP 连接。',
@@ -27,6 +28,7 @@ const en: typeof zh = {
27
28
  copyConfig: 'Copy Config', copyPrompt: 'Copy Prompt', copied: 'Copied.',
28
29
  output: 'Copy Content', manualCopy: 'Automatic copying failed. Copy the text below manually.',
29
30
  unavailable: 'Connection settings are unavailable. Please retry.', retry: 'Retry', failed: 'Settings could not be applied. The current connection remains available.',
31
+ outdatedService: 'This workspace is still using an older background service. Update the Presmium connection in your AI client to the desktop app’s bundled version, reconnect, then reopen the workspace.',
30
32
  portBusy: 'This port is unavailable. Choose another port or use 0 to assign one automatically.',
31
33
  conflict: 'Another window updated these settings. Reload before editing.', invalid: 'Enter an integer port from 0 to 65535.',
32
34
  noCommand: 'This service has no local launch command. Use HTTP instead.',
@@ -18,7 +18,9 @@ export function McpSettingsPanel() {
18
18
  if (!workbench.client.readMcpSettings) throw new Error('unsupported')
19
19
  const value = await workbench.client.readMcpSettings(controller.signal)
20
20
  if (owner.current && !controller.signal.aborted) accept(value)
21
- } catch { if (owner.current && !controller.signal.aborted) setFailure(t.unavailable) }
21
+ } catch (error) {
22
+ if (owner.current && !controller.signal.aborted) setFailure(error instanceof WorkspaceServerError && error.status === 404 ? t.outdatedService : t.unavailable)
23
+ }
22
24
  finally { if (owner.current && !controller.signal.aborted) setBusy(false) }
23
25
  }
24
26
  useEffect(() => { owner.current = true; void load(); return () => { owner.current = false; request.current?.abort() } }, [workbench])