fix: remove all console.log/warn to avoid breaking TUI
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user