You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: messages calls service-open directly, no wrapper RPC
service-open now resolves a relative `path` against its workspaceRoot
(absolute paths unchanged), so a client holding only a workspace-relative
path can call it directly. The messages panel drops its
`devframes:plugin:messages:open-file` bridge (and DP_MESSAGES_0002) and
calls `devframes:service:open:open-in-editor` straight from the client.
Removes the now-dead DS_OPEN_0001 (paths are no longer required absolute).
Copy file name to clipboardExpand all lines: docs/guide/services.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ state.on('updated', render)
153
153
154
154
### Built-in services
155
155
156
-
**`@devframes/service-open`** (`devframes:service:open`) opens files in the user's editor (`open-in-editor`, with optional `line`/`column`) or reveals them in the OS file explorer (`open-in-finder`). Callers pass **absolute** paths; the service refuses anything outside the workspace root and the configured extra `roots` (`DS_OPEN_0002`), and gates editor commands to the `KNOWN_EDITORS` picklist. Options: `{ editor?, roots? }` — the preferred editor (later installer wins) and additional openable directories (merged as a union). It supersedes the per-plugin `devframe/recipes/common-rpc-functions` registrations, now deprecated.
156
+
**`@devframes/service-open`** (`devframes:service:open`) opens files in the user's editor (`open-in-editor`, with optional `line`/`column`) or reveals them in the OS file explorer (`open-in-finder`). Paths may be absolute or relative to the workspace root (so a client with only a workspace-relative path — a message's file position, say — calls it directly); the service refuses anything outside the workspace root and the configured extra `roots` (`DS_OPEN_0002`), and gates editor commands to the `KNOWN_EDITORS` picklist. Options: `{ editor?, roots? }` — the preferred editor (later installer wins) and additional openable directories (merged as a union). It supersedes the per-plugin `devframe/recipes/common-rpc-functions` registrations, now deprecated.
157
157
158
158
**`@devframes/service-shiki`** (`devframes:service:shiki`) renders [Shiki](https://shiki.style) syntax highlighting on the server, so plugin bundles stop shipping grammars and themes. Three RPC queries — `highlight` (dual-theme HTML), `code-to-hast`, and `code-to-tokens` (for renderers that own their DOM, e.g. diff views) — all client-`cacheable` and LRU-cached server-side per `(code, lang, themes)`. Unknown languages degrade to plain text. Options: `{ themes?, langs? }` — the default light/dark pair (defaults `vitesse-light`/`vitesse-dark`, matching the design system; later installer wins) and languages to eagerly load (merged as a union).
`"${p.id}" is mounted on a context without a hub messages host (\`ctx.messages\`) — its RPC surface stays registered but no-ops, so the panel will show an empty feed.`,
15
15
fix: 'Mount this devframe through a hub host (`@devframes/hub`\'s `initHub`, or `createHubContext` + `ctx.install`) to get a live message feed.',
16
16
},
17
-
DP_MESSAGES_0002: {
18
-
why: 'Cannot open the file: the "@devframes/service-open" wire service is not installed on this host.',
19
-
fix: 'Install the service package next to the messages plugin (it is declared in the plugin\'s `services`), or install it host-side via `ctx.services.install(createOpenService())`.',
Copy file name to clipboardExpand all lines: services/open/src/diagnostics.ts
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,6 @@ import { defineDiagnostics } from 'devframe/utils/nostics'
6
6
exportconstdiagnostics=defineDiagnostics({
7
7
docsBase: 'https://devfra.me/errors',
8
8
codes: {
9
-
DS_OPEN_0001: {
10
-
why: (p: {path: string})=>`Refusing to open "${p.path}": the path is not absolute.`,
11
-
fix: 'Resolve the path on the caller side (e.g. against the workspace root or your plugin\'s managed directory) before calling the open service.',
12
-
},
13
9
DS_OPEN_0002: {
14
10
why: (p: {path: string})=>`Refusing to open "${p.path}": the path is outside the workspace root and every configured extra root.`,
15
11
fix: 'The open service only touches files under the workspace root by default. Pass additional allowed directories via the service\'s `roots` option when your tool manages files elsewhere (e.g. a global storage dir).',
0 commit comments