diff --git a/README.md b/README.md index ad23fce..0e86b0a 100644 --- a/README.md +++ b/README.md @@ -133,9 +133,16 @@ webview to the sidebar. MCP speaks all three of its pillars rather than tools al MCP resources and prompts are offered to the agent, not just listed in a panel. Where it is still thin, specifically: a `WorkspaceEdit` cannot create, delete or rename -files, and the shim has no `TextEditor` decorations, no custom editors, and no debug adapter -API. Each of those throws rather than returning an empty value, so an extension that needs -one fails loudly instead of quietly doing nothing. +files, and the shim has no custom editors and no debug adapter API. Those three fail loudly — +`WorkspaceEdit` throws, and the other two are absent from the API object, so calling one is a +`TypeError` rather than a quiet nothing. + +One gap does not behave that way, and saying otherwise here was worse than the gap itself: +**`createTextEditorDecorationType` returns a working-looking handle and `setDecorations` +accepts ranges, and nothing is ever drawn.** An extension doing inline blame or coverage +highlighting gets a successful answer and no pixels. It is the one place left with the shape +this project spent a release removing; it is named here until it is built rather than +described as something it is not. ## Contributing diff --git a/ide/src/ext/vscodeShim.ts b/ide/src/ext/vscodeShim.ts index 74775aa..4297d61 100644 --- a/ide/src/ext/vscodeShim.ts +++ b/ide/src/ext/vscodeShim.ts @@ -757,7 +757,22 @@ export function makeVscodeApi(deps: ShimDeps, ext: { id: string; name: string; c const api: any = { version: "1.85.0", commands, window: window_, languages, workspace, - env: { appName: "Schutz", language: getLang(), machineId: "schutz", openExternal: () => Promise.resolve(true), clipboard: { writeText: () => Promise.resolve(), readText: () => Promise.resolve("") } }, + // env 셋이 전부 성공을 답하고 아무것도 안 했다. openExternal 은 true 를 돌려주며 + // 브라우저를 열지 않았고(그 IPC 는 진작 있었다), 클립보드는 어디에도 쓰지 않고 + // 늘 빈 문자열을 읽었다. 확장 입장에서는 "썼는데 비어 있다" 라 자기 버그로 보인다. + env: { + appName: "Schutz", language: getLang(), machineId: "schutz", + openExternal: async (target: any) => { + const url = String(target?.toString?.() ?? target ?? ""); + if (!url) return false; + const r = await window.schutz?.openExternal(url); + return !!r?.ok; // 메인이 http/https/mailto 만 연다 — 거절도 그대로 전한다 + }, + clipboard: { + writeText: (text: string) => navigator.clipboard.writeText(String(text ?? "")), + readText: () => navigator.clipboard.readText(), + }, + }, Uri: UriShim, Position, Range, Selection, Location, Disposable, EventEmitter, MarkdownString, CompletionItem, CompletionItemKind, Hover, ThemeIcon, ThemeColor, WorkspaceEdit, CodeAction, CodeActionKind,