Update Astra: v2.80.19 - Refactoring Sidebar, LM Studio integration, and new tests

This commit is contained in:
g1nation
2026-05-08 23:14:47 +09:00
parent d083177d95
commit 5ffb472d22
28 changed files with 3125 additions and 1797 deletions
+32
View File
@@ -0,0 +1,32 @@
import { SidebarChatProvider } from '../sidebarProvider';
import { logInfo } from '../utils';
/**
* Handles agent-skill messages: the per-conversation agent picker, agent CRUD,
* and persisting the user's last selected agent.
*/
export async function handleAgentMessage(provider: SidebarChatProvider, data: any): Promise<boolean> {
switch (data.type) {
case 'getAgents':
await provider._sendAgentsList();
return true;
case 'createAgent':
await provider._createAgent();
return true;
case 'getAgentContent':
await provider._sendAgentContent(data.path);
return true;
case 'updateAgent':
await provider._updateAgent(data.path, data.content, data.negativePrompt);
return true;
case 'deleteAgent':
await provider._deleteAgent(data.path);
return true;
case 'saveAgentSelection':
await provider._context.globalState.update(SidebarChatProvider.lastAgentStateKey, data.path || 'none');
logInfo(`Agent selection saved: ${data.path}`);
return true;
default:
return false;
}
}