@posthog/agent 1.21.0 → 1.22.0
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/claude-cli/cli.js +1396 -1347
- package/dist/src/git-manager.d.ts +1 -0
- package/dist/src/git-manager.d.ts.map +1 -1
- package/dist/src/git-manager.js +10 -3
- package/dist/src/git-manager.js.map +1 -1
- package/dist/src/task-progress-reporter.d.ts.map +1 -1
- package/dist/src/task-progress-reporter.js +12 -1
- package/dist/src/task-progress-reporter.js.map +1 -1
- package/dist/src/workflow/steps/finalize.d.ts.map +1 -1
- package/dist/src/workflow/steps/finalize.js +12 -3
- package/dist/src/workflow/steps/finalize.js.map +1 -1
- package/package.json +2 -2
- package/src/git-manager.ts +11 -3
- package/src/task-progress-reporter.ts +12 -1
- package/src/workflow/steps/finalize.ts +12 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LocalArtifact } from '../../file-manager.js';
|
|
2
2
|
import type { Task, TaskRunArtifact } from '../../types.js';
|
|
3
3
|
import type { WorkflowStepRunner } from '../types.js';
|
|
4
|
+
import { finalizeStepGitActions } from '../utils.js';
|
|
4
5
|
|
|
5
6
|
const MAX_SNIPPET_LENGTH = 1200;
|
|
6
7
|
|
|
@@ -48,6 +49,12 @@ export const finalizeStep: WorkflowStepRunner = async ({ step, context }) => {
|
|
|
48
49
|
const prBody = buildPullRequestBody(task, artifacts, uploadedArtifacts);
|
|
49
50
|
await fileManager.cleanupTaskDirectory(task.id);
|
|
50
51
|
await gitManager.addAllPostHogFiles();
|
|
52
|
+
|
|
53
|
+
// Commit the deletion of artifacts
|
|
54
|
+
await finalizeStepGitActions(context, step, {
|
|
55
|
+
commitMessage: `Cleanup task artifacts for ${task.title}`,
|
|
56
|
+
allowEmptyCommit: true
|
|
57
|
+
});
|
|
51
58
|
|
|
52
59
|
context.stepResults[step.id] = {
|
|
53
60
|
prBody,
|
|
@@ -78,7 +85,7 @@ function buildPullRequestBody(task: Task, artifacts: LocalArtifact[], uploaded?:
|
|
|
78
85
|
if (contextArtifact) {
|
|
79
86
|
lines.push('');
|
|
80
87
|
lines.push('### Task prompt');
|
|
81
|
-
lines.push(
|
|
88
|
+
lines.push(contextArtifact.content);
|
|
82
89
|
usedFiles.add(contextArtifact.name);
|
|
83
90
|
}
|
|
84
91
|
|
|
@@ -96,7 +103,7 @@ function buildPullRequestBody(task: Task, artifacts: LocalArtifact[], uploaded?:
|
|
|
96
103
|
if (planArtifact) {
|
|
97
104
|
lines.push('');
|
|
98
105
|
lines.push('### Implementation plan');
|
|
99
|
-
lines.push(
|
|
106
|
+
lines.push(planArtifact.content);
|
|
100
107
|
usedFiles.add(planArtifact.name);
|
|
101
108
|
}
|
|
102
109
|
|
|
@@ -130,7 +137,9 @@ function buildPullRequestBody(task: Task, artifacts: LocalArtifact[], uploaded?:
|
|
|
130
137
|
lines.push('');
|
|
131
138
|
lines.push('### Uploaded artifacts');
|
|
132
139
|
for (const artifact of artifactList) {
|
|
133
|
-
const
|
|
140
|
+
const rawStoragePath = 'storage_path' in artifact ? (artifact as any).storage_path : undefined;
|
|
141
|
+
const storagePath = typeof rawStoragePath === 'string' ? rawStoragePath : undefined;
|
|
142
|
+
const storage = storagePath && storagePath.trim().length > 0 ? ` – \`${storagePath.trim()}\`` : '';
|
|
134
143
|
lines.push(`- ${artifact.name} (${artifact.type})${storage}`);
|
|
135
144
|
}
|
|
136
145
|
}
|