codeep 1.0.49 → 1.0.50
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/dist/app.js +14 -9
- package/dist/utils/agent.d.ts +1 -1
- package/dist/utils/agent.js +2 -2
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -36,6 +36,7 @@ import { performCodeReview, formatReviewResult } from './utils/codeReview.js';
|
|
|
36
36
|
import { learnFromProject, addCustomRule, getLearningStatus } from './utils/learning.js';
|
|
37
37
|
import { getAllSkills, findSkill, formatSkillsList, formatSkillHelp, generateSkillPrompt, saveCustomSkill, deleteCustomSkill, parseSkillChain, parseSkillArgs, searchSkills, trackSkillUsage, getSkillStats } from './utils/skills.js';
|
|
38
38
|
import { AgentProgress, AgentSummary } from './components/AgentProgress.js';
|
|
39
|
+
import { createActionLog } from './utils/tools.js';
|
|
39
40
|
export const App = () => {
|
|
40
41
|
const { exit } = useApp();
|
|
41
42
|
const { stdout } = useStdout();
|
|
@@ -272,19 +273,23 @@ export const App = () => {
|
|
|
272
273
|
setAgentIteration(iteration);
|
|
273
274
|
},
|
|
274
275
|
onToolCall: (tool) => {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
276
|
+
// Create a placeholder action - will be updated by onToolResult
|
|
277
|
+
const placeholderResult = {
|
|
278
|
+
success: true,
|
|
279
|
+
output: '',
|
|
280
|
+
tool: tool.tool,
|
|
281
|
+
parameters: tool.parameters,
|
|
282
|
+
};
|
|
283
|
+
const actionLog = createActionLog(tool, placeholderResult);
|
|
284
|
+
setAgentActions(prev => [...prev, actionLog]);
|
|
281
285
|
},
|
|
282
|
-
onToolResult: (result) => {
|
|
286
|
+
onToolResult: (result, toolCall) => {
|
|
287
|
+
// Replace the last action with the complete one
|
|
288
|
+
const actionLog = createActionLog(toolCall, result);
|
|
283
289
|
setAgentActions(prev => {
|
|
284
290
|
const updated = [...prev];
|
|
285
291
|
if (updated.length > 0) {
|
|
286
|
-
updated[updated.length - 1]
|
|
287
|
-
updated[updated.length - 1].details = result.success ? result.output.slice(0, 100) : result.error;
|
|
292
|
+
updated[updated.length - 1] = actionLog;
|
|
288
293
|
}
|
|
289
294
|
return updated;
|
|
290
295
|
});
|
package/dist/utils/agent.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface AgentOptions {
|
|
|
10
10
|
maxIterations: number;
|
|
11
11
|
maxDuration: number;
|
|
12
12
|
onToolCall?: (tool: ToolCall) => void;
|
|
13
|
-
onToolResult?: (result: ToolResult) => void;
|
|
13
|
+
onToolResult?: (result: ToolResult, toolCall: ToolCall) => void;
|
|
14
14
|
onIteration?: (iteration: number, message: string) => void;
|
|
15
15
|
onThinking?: (text: string) => void;
|
|
16
16
|
onVerification?: (results: VerifyResult[]) => void;
|
package/dist/utils/agent.js
CHANGED
|
@@ -680,7 +680,7 @@ export async function runAgent(prompt, projectContext, options = {}) {
|
|
|
680
680
|
// Actually execute the tool
|
|
681
681
|
toolResult = executeTool(toolCall, projectContext.root || process.cwd());
|
|
682
682
|
}
|
|
683
|
-
opts.onToolResult?.(toolResult);
|
|
683
|
+
opts.onToolResult?.(toolResult, toolCall);
|
|
684
684
|
// Log action
|
|
685
685
|
const actionLog = createActionLog(toolCall, toolResult);
|
|
686
686
|
actions.push(actionLog);
|
|
@@ -770,7 +770,7 @@ export async function runAgent(prompt, projectContext, options = {}) {
|
|
|
770
770
|
for (const toolCall of fixToolCalls) {
|
|
771
771
|
opts.onToolCall?.(toolCall);
|
|
772
772
|
const toolResult = executeTool(toolCall, projectContext.root || process.cwd());
|
|
773
|
-
opts.onToolResult?.(toolResult);
|
|
773
|
+
opts.onToolResult?.(toolResult, toolCall);
|
|
774
774
|
const actionLog = createActionLog(toolCall, toolResult);
|
|
775
775
|
actions.push(actionLog);
|
|
776
776
|
if (toolResult.success) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.50",
|
|
4
4
|
"description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|