Native surfaces migration — evolve the extension onto VS Code's native review surfaces (9-task plan, spec v0.2.1) (#72)
This commit was merged in pull request #72.
This commit is contained in:
@@ -17,6 +17,8 @@ async function open(docRel: string): Promise<vscode.TextDocument> {
|
||||
const uri = vscode.Uri.file(path.join(WS, docRel));
|
||||
const doc = await vscode.workspace.openTextDocument(uri);
|
||||
await vscode.window.showTextDocument(doc);
|
||||
// INV-10: thread creation/rendering is gated on coediting (Task 4).
|
||||
await vscode.commands.executeCommand("cowriting.coeditDocument");
|
||||
return doc;
|
||||
}
|
||||
async function getApi(): Promise<CowritingApi> {
|
||||
@@ -55,6 +57,13 @@ suite("F5 cross-rung round-trip (host E2E)", () => {
|
||||
const DOC = "docs/crossrung.md";
|
||||
const doc = await open(DOC);
|
||||
const api = await getApi();
|
||||
// Task 6 (D10): createThreadOnSelection also fires the respond-in-thread
|
||||
// turn now — stub it off so it can't race the forge stand-in's reply
|
||||
// below (this test asserts an EXACT 2-message sequence: editor note +
|
||||
// forge reply).
|
||||
api.threadController.setTurnRunnerForTest(async () => {
|
||||
throw new Error("crossrung suite: reply-loop turn stubbed off");
|
||||
});
|
||||
const target = "portable record";
|
||||
const start = doc.getText().indexOf(target);
|
||||
const editor = vscode.window.activeTextEditor!;
|
||||
|
||||
Reference in New Issue
Block a user