task(A3): pilot v2 tools select+line

This commit is contained in:
Agent Zero
2026-08-26 21:30:54 +02:00
parent ddfeadac58
commit 09a120d800
6 changed files with 340 additions and 1 deletions
+7 -1
View File
@@ -25,6 +25,10 @@ export interface DispatcherDeps {
setPreview?(el: unknown | null): void;
/** Tool-Nachschlag überschreibbar (Default: aktive Registry-Tools). */
toolLookup?(toolId: string): ToolExtensionV2 | undefined;
/** Dokument-Fassade für Tools (ab A3; lazy pro Event abgefragt). */
getDoc?(): import('../kernel/document/CADDocument').CADDocument | undefined;
/** Selektions-Bridge für Tools (ab A3; lazy pro Event abgefragt). */
getSelectionBridge?(): import('../plugins/types').ToolSelectionBridge;
}
export class InteractionDispatcher {
@@ -91,12 +95,14 @@ export class InteractionDispatcher {
this.bound = true;
}
private buildContext(): ToolContext {
private buildContext(): import('../plugins/types').FullToolContext {
const toolId = this.active?.manifest.id ?? '';
return {
options: this.deps.getOptions?.(toolId) ?? {},
setStatus: (msg) => this.setStatus(msg),
setPreview: (el) => this.deps.setPreview?.(el),
doc: this.deps.getDoc?.(),
selection: this.deps.getSelectionBridge?.(),
};
}