Первый коммит

This commit is contained in:
2026-04-09 15:42:42 +03:00
commit c664209746
28 changed files with 2616 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import { ChatController } from "./ChatController";
import { WebviewMessage } from "./models";
export class WebviewMessageRouter {
constructor(private readonly controller: ChatController) {}
async handle(message: WebviewMessage): Promise<void> {
switch (message.type) {
case "ready":
await this.controller.handleReady();
break;
case "send":
await this.controller.sendMessage(String(message.text || ""));
break;
case "clear":
await this.controller.startNewSession();
break;
case "menu":
await this.controller.handleMenu(String(message.action || ""));
break;
case "set-process-version":
this.controller.setProcessVersion(String(message.value || "v2"));
break;
default:
break;
}
}
}