@lucashca/claudecontrol 0.3.26 → 0.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backend/agents/store.ts +4 -2
- package/backend/routes/agents.ts +6 -6
- package/backend/types.ts +1 -0
- package/frontend/src/api.ts +1 -1
- package/frontend/src/components/chat/DelegationStatusBar.tsx +2 -2
- package/frontend/src/types/index.ts +1 -0
- package/package.json +1 -1
- package/version.json +1 -1
package/backend/agents/store.ts
CHANGED
|
@@ -118,8 +118,10 @@ export function pushLog(session: AgentSession, entry: LogEntry) {
|
|
|
118
118
|
persistLogEntry(session.workspaceId, session.id, entry);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
export function
|
|
122
|
-
|
|
121
|
+
export function hideLogEntry(session: AgentSession, predicate: (e: LogEntry) => boolean) {
|
|
122
|
+
for (const entry of session.log) {
|
|
123
|
+
if (predicate(entry)) entry.hidden = true;
|
|
124
|
+
}
|
|
123
125
|
const logPath = agentLogPath(session.workspaceId, session.id);
|
|
124
126
|
try { writeFileSync(logPath, session.log.map(e => JSON.stringify(e)).join('\n') + (session.log.length ? '\n' : '')); } catch { /* ignore */ }
|
|
125
127
|
}
|
package/backend/routes/agents.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { broadcast } from '../ws.js';
|
|
|
5
5
|
import { getWorkspaceById } from '../workspaces.js';
|
|
6
6
|
import {
|
|
7
7
|
genId, agents, agentAbortControllers, agentConversations,
|
|
8
|
-
persistAgents, persistLogEntry, addAgentToIndex, pushLog,
|
|
8
|
+
persistAgents, persistLogEntry, addAgentToIndex, pushLog, hideLogEntry,
|
|
9
9
|
delegations, agentQueues,
|
|
10
10
|
} from '../agents/store.js';
|
|
11
11
|
import { sendToAgent, runAgentQuery, delegateTask, compactAgentContext } from '../agents/lifecycle.js';
|
|
@@ -81,14 +81,14 @@ export async function handleAgentRoutes(
|
|
|
81
81
|
return true;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
// ──
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
const agent = agents.get(
|
|
84
|
+
// ── PATCH /api/agents/:id/log?delegationId=xxx (hide log entry) ──
|
|
85
|
+
const hideLogParams = matchRoute(path, '/api/agents/:id/log');
|
|
86
|
+
if (hideLogParams && method === 'PATCH') {
|
|
87
|
+
const agent = agents.get(hideLogParams.id);
|
|
88
88
|
if (!agent) { jsonError(res, 'Agent not found', 404); return true; }
|
|
89
89
|
const delegationId = _urlObj.searchParams.get('delegationId');
|
|
90
90
|
if (!delegationId) { jsonError(res, 'delegationId is required'); return true; }
|
|
91
|
-
|
|
91
|
+
hideLogEntry(agent, e => e.delegationId === delegationId);
|
|
92
92
|
broadcast({ type: 'agent_log_updated', agentId: agent.id, workspaceId: agent.workspaceId, log: agent.log });
|
|
93
93
|
json(res, { ok: true });
|
|
94
94
|
return true;
|
package/backend/types.ts
CHANGED
package/frontend/src/api.ts
CHANGED
|
@@ -86,7 +86,7 @@ export const api = {
|
|
|
86
86
|
post(`/workspaces/${wsId}/agents`, data),
|
|
87
87
|
|
|
88
88
|
deleteAgent: (id: string) => del(`/agents/${id}`),
|
|
89
|
-
|
|
89
|
+
hideLogEntry: (agentId: string, delegationId: string) => patch(`/agents/${agentId}/log?delegationId=${encodeURIComponent(delegationId)}`, {}),
|
|
90
90
|
|
|
91
91
|
sendMessage: (agentId: string, message: string, attachments?: import('./types').Attachment[], effort?: string, model?: string) =>
|
|
92
92
|
post(`/agents/${agentId}/send`, { message, attachments, effort, model }),
|
|
@@ -65,7 +65,7 @@ export function DelegationStatusBar({ agentId }: { agentId: string }) {
|
|
|
65
65
|
if (!agent) return null;
|
|
66
66
|
|
|
67
67
|
const allDelegations = agent.log.filter(
|
|
68
|
-
e => e.type === 'delegation' && e.delegationTo && e.delegationStatus,
|
|
68
|
+
e => e.type === 'delegation' && e.delegationTo && e.delegationStatus && !e.hidden,
|
|
69
69
|
);
|
|
70
70
|
|
|
71
71
|
const delegations = allDelegations.filter(e => !dismissed[e.delegationId!]);
|
|
@@ -104,7 +104,7 @@ export function DelegationStatusBar({ agentId }: { agentId: string }) {
|
|
|
104
104
|
<button
|
|
105
105
|
onClick={() => {
|
|
106
106
|
setDismissed(prev => { const next = { ...prev, [delegation.delegationId!]: true }; saveDismissed(next); return next; });
|
|
107
|
-
api.
|
|
107
|
+
api.hideLogEntry(agentId, delegation.delegationId!).catch(() => {});
|
|
108
108
|
}}
|
|
109
109
|
className="px-2 py-1.5 text-cc-muted hover:text-cc-text-secondary transition-colors shrink-0"
|
|
110
110
|
>
|
package/package.json
CHANGED
package/version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.3.
|
|
1
|
+
{"version":"0.3.27","build":"2026-04-03T23:24:27.772Z"}
|