fix: remove all console.log/warn to avoid breaking TUI

This commit is contained in:
Vectry
2026-02-10 13:46:55 +00:00
parent 638a5d2640
commit 07cf717c15
4 changed files with 9 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "opencode-agentlens",
"version": "0.1.5",
"version": "0.1.6",
"description": "OpenCode plugin for AgentLens — trace your coding agent's decisions, tool calls, and sessions",
"type": "module",
"main": "./dist/index.cjs",

View File

@@ -22,11 +22,10 @@ const plugin: Plugin = async ({ project, directory, worktree }) => {
const config = loadConfig();
if (!config.enabled || !config.apiKey) {
console.log("[agentlens] Plugin disabled — missing AGENTLENS_API_KEY");
return {};
}
console.log(`[agentlens] Plugin enabled — endpoint: ${config.endpoint}`);
init({
apiKey: config.apiKey,
@@ -62,7 +61,7 @@ const plugin: Plugin = async ({ project, directory, worktree }) => {
worktree,
title: info?.["title"] as string | undefined,
});
console.log(`[agentlens] Session started: ${sessionId}`);
}
}
@@ -107,7 +106,7 @@ const plugin: Plugin = async ({ project, directory, worktree }) => {
if (sessionId) {
state.endSession(sessionId);
await flush();
console.log(`[agentlens] Session ended and flushed: ${sessionId}`);
}
}
@@ -157,9 +156,7 @@ const plugin: Plugin = async ({ project, directory, worktree }) => {
directory,
worktree,
});
console.log(
`[agentlens] Auto-created session from tool call: ${input.sessionID}`,
);
}
state.startToolCall(
input.callID,
@@ -186,9 +183,7 @@ const plugin: Plugin = async ({ project, directory, worktree }) => {
directory,
worktree,
});
console.log(
`[agentlens] Auto-created session from chat.message: ${input.sessionID}`,
);
}
if (input.model) {
state.recordLLMCall(input.sessionID, {