bfd951552c
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.3 KiB
2.3 KiB
Manual smoke — F8 out-of-workspace authoring
Confirms "Ask Claude to Edit Selection" (+ threads / attribution) work on a file outside the workspace folder and on an untitled buffer, while in-workspace authoring is unchanged. One live turn hits the SDK (the only LLM step).
Spec: vscode-cowriting-plugin-content/specs/coauthoring-out-of-workspace.md.
Prereqs
- Build:
npm run build. - Launch the Extension Development Host (F5 in VS Code) with this repo's
sandbox/opened as the workspace folder.
A. Out-of-folder file (PUC-1)
- Open a markdown file from a DIFFERENT directory (outside
sandbox/) — e.g. a sibling repo, orFile > Opena scratch file under/tmp. - Select a sentence → Command Palette → Cowriting: Ask Claude to Edit Selection → type an instruction → wait for the proposal (amber range + ✓/✗).
- Accept (✓). Expect: the text is replaced and shows the Claude attribution tint.
- Add a coauthoring thread on a selection (Add Coauthoring Thread on Selection).
- Close and reopen the file (or revert). Expect: the thread + attribution are
restored. There is no
.threads/folder beside the file — its state lives in VS Code global storage (<globalStorage>/sidecars/<hash>.json).
B. Untitled buffer (PUC-2)
File > New File(don't save) → type a few sentences.- Select → Ask Claude to Edit Selection → instruct → accept. Expect: it works exactly like A, in-session.
- Reload the window (Developer: Reload Window). Expect: the untitled buffer's coauthoring state is gone (in-memory only — documented limitation, §6.7).
C. In-workspace unchanged (PUC-3)
- Open a file UNDER
sandbox/. Repeat the propose→accept→thread loop. - Expect: a committable
sandbox/.threads/<path>.jsonsidecar is written, exactly as before F8 (byte-for-byte, INV-2).
D. Read-only view declines (PUC-5)
- Open a Git diff / Output view, select text, run Ask Claude to Edit Selection.
- Expect: a warning that this kind of document can't be edited (not "select some text").
E. Folder-less (optional)
- Launch the EDH with no folder open. Open an untitled buffer or
File > Openany file. Repeat A/B. Expect: authoring works (every doc routes to global storage); the commands are not stubbed.