From 5311bdcbf47762ce5039b53bca144cdc9e7e208a Mon Sep 17 00:00:00 2001 From: Seungpyo1007 Date: Thu, 6 Aug 2026 09:59:01 +0900 Subject: [PATCH] =?UTF-8?q?=ED=99=95=EC=9E=A5=EC=97=90=EA=B2=8C=20?= =?UTF-8?q?=EB=B8=8C=EB=9D=BC=EC=9A=B0=EC=A0=80=EC=99=80=20=ED=81=B4?= =?UTF-8?q?=EB=A6=BD=EB=B3=B4=EB=93=9C=EB=A5=BC=20=EB=8F=8C=EB=A0=A4?= =?UTF-8?q?=EC=A3=BC=EA=B3=A0,=20README=20=EB=A5=BC=20=EC=82=AC=EC=8B=A4?= =?UTF-8?q?=EA=B3=BC=20=EB=A7=9E=EC=B6=98=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit README 는 셰임에 남은 구멍들이 "빈 값을 돌려주는 대신 던진다" 고 적어 뒀다. 확인해 보니 셋 중 둘만 맞았다. WorkspaceEdit 는 정말 던지고, 커스텀 에디터와 디버그 어댑터는 API 객체에 아예 없어 TypeError 가 난다. 데코레이션은 아니다 — createTextEditorDecorationType 이 멀쩡해 보이는 핸들을 주고 setDecorations 가 범위를 받아 놓고, 아무것도 그리지 않는다. 문서가 언급조차 안 한 자리가 둘 더 있었다. env 안이다. openExternal: () => Promise.resolve(true), // 아무것도 안 열고 true clipboard: { writeText: () => Promise.resolve(), // 어디에도 안 쓰고 readText: () => Promise.resolve("") } // 늘 빈 문자열 openExternal 은 schutz:openExternal IPC 가 진작 있었는데도 부르지 않고 성공만 답했다. 클립보드는 앱 자신이 navigator.clipboard 를 여섯 군데서 쓰고 있다. 확장 입장에서는 "썼는데 비어 있다" 라 자기 버그로 보인다. 둘을 실제 경로에 연결한다. 메인이 http/https/mailto 만 열므로 거절도 그대로 전한다. 데코레이션은 구현이 따로 필요하므로 지금은 README 에 이름을 박아 둔다 — 이 저장소가 한 판을 통째로 들여 없앤 그 모양이 하나 남아 있다는 사실을, 아니라고 적어 두는 것보다는 낫다. 브라우저를 실제로 열고 클립보드를 덮어쓰는 일이라 실제 앱 프로브는 돌리지 않았다. 배선은 코드로 확인했다. typecheck·build 통과, 단위 981개 통과. --- README.md | 13 ++++++++++--- ide/src/ext/vscodeShim.ts | 17 ++++++++++++++++- 2 files changed, 26 insertions(+), 4 deletions(-) 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,