feat(f9): preview gains authorship mode + attribution dep + setMode wiring
Per-panel mode (default changes); refresh branches to renderAuthorship reading AttributionController.spansFor; webview setMode message; extension.ts reorders the F7 controller after attribution. getMode/setMode test seams. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+11
-10
@@ -70,16 +70,6 @@ export function activate(context: vscode.ExtensionContext): CowritingApi | undef
|
||||
// still works — PUC-5.
|
||||
const globalSidecarStore = new GlobalSidecarStore(baselineStorageDir ?? "");
|
||||
|
||||
// --- F7: rendered track-changes preview (Feature #21) — workspace-INDEPENDENT ---
|
||||
// Like F6, F7 works on any markdown doc (incl. untitled / out-of-folder), so it
|
||||
// is constructed regardless of an open folder and its command is always live.
|
||||
// It reuses the F6 baseline (INV-20) and adds no persistence.
|
||||
const trackChangesPreviewController = new TrackChangesPreviewController(
|
||||
diffViewController,
|
||||
context.extensionUri,
|
||||
);
|
||||
context.subscriptions.push(trackChangesPreviewController);
|
||||
|
||||
// --- F8: authoring on ANY document (in-folder, out-of-folder, untitled) ---
|
||||
// The router routes per-document: in-workspace file: → the committable repo
|
||||
// `.threads/` sidecar (CoauthorStore, INV-2); out-of-folder file: + untitled:
|
||||
@@ -99,6 +89,17 @@ export function activate(context: vscode.ExtensionContext): CowritingApi | undef
|
||||
const attributionController = new AttributionController(sidecarRouter, root, versionGuard);
|
||||
context.subscriptions.push(attributionController);
|
||||
|
||||
// --- F7: rendered track-changes preview (Feature #21) + F9 authorship mode ---
|
||||
// Workspace-INDEPENDENT (works on any markdown doc, reuses the F6 baseline,
|
||||
// INV-20). Constructed AFTER attribution so F9's authorship view can read F3
|
||||
// spans (AttributionController.spansFor).
|
||||
const trackChangesPreviewController = new TrackChangesPreviewController(
|
||||
diffViewController,
|
||||
context.extensionUri,
|
||||
attributionController,
|
||||
);
|
||||
context.subscriptions.push(trackChangesPreviewController);
|
||||
|
||||
// --- F4: propose/accept (Feature #12) ---
|
||||
const proposalController = new ProposalController(sidecarRouter, attributionController, root, versionGuard);
|
||||
context.subscriptions.push(proposalController);
|
||||
|
||||
Reference in New Issue
Block a user