Open-source, local-first AI agent for real work.
TypeScript agent-toolsai-agentbyokcoding-agentcross-platformdesktop-appdeveloper-toolselectronharnessknowledge-basellmwikilocal-firstmcpplugin-systemprivacy-firstskillstypescriptvettaworkflow-automation
/**
* Displays a status widget showing the system prompt length.
*
* Demonstrates ctx.getSystemPrompt() for accessing the effective system prompt.
*/
import type { ExtensionAPI } from "@vetta/coding-agent";
export default function (api: ExtensionAPI) {
api.on("agent_start", (_event, ctx) => {
const prompt = ctx.getSystemPrompt();
ctx.ui.setStatus("system-prompt", `System: ${prompt.length} chars`);
});
api.on("session_shutdown", (_event, ctx) => {
ctx.ui.setStatus("system-prompt", undefined);
});
}