You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/zsh/functions/wiggum
+13-31Lines changed: 13 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -63,38 +63,15 @@ ONLY WORK ON A SINGLE TASK.
63
63
64
64
This prompt is iteration number $iteration.
65
65
66
-
After you have completed the task, append an entry to wiggum_log.json with:
67
-
68
-
- a summary of what was done
69
-
- a list of actions taken
70
-
- a list of all commands run
71
-
- errors or issues encountered
72
-
- success or failure
73
-
74
-
If wiggum_log.json doesn't exist, create it. It should be a JSON file containing an array of objects:
66
+
After you have completed the task, output a log entry as JSON on a single line prefixed with WIGGUM_LOG:
75
67
76
68
\`\`\`
77
-
[
78
-
{
79
-
"iteration": 1,
80
-
"success": true,
81
-
"summary": "CSS added to style header",
82
-
"steps_taken": [
83
-
"decided to name CSS file foo.css",
84
-
"created CSS file"
85
-
],
86
-
"commands_run": [
87
-
"touch ./foo.css",
88
-
],
89
-
"issues_encountered": [],
90
-
},
91
-
...
92
-
]
69
+
WIGGUM_LOG:{"success":true,"summary":"CSS added to style header","steps_taken":["decided to name CSS file foo.css","created CSS file"],"commands_run":["touch ./foo.css"],"issues_encountered":[]}
93
70
\`\`\`
94
71
95
72
ONLY WORK ON A SINGLE TASK.
96
73
97
-
If there is no further work to do, output exactly WIGGUM:OVER
74
+
If there is no further work to do, output exactly WIGGUM:OVER instead of a log entry.
98
75
99
76
ONLY WORK ON A SINGLE TASK.
100
77
EOF
@@ -109,14 +86,19 @@ EOF
109
86
break
110
87
fi
111
88
112
-
if [[ -f "wiggum_log.json" ]] && [[ $(jq '.[-1] | has("timestamp") | not' wiggum_log.json) == "true" ]]; then
89
+
local log_json=$(echo "$output" | grep -oE 'WIGGUM_LOG:\{[^}]+\}' | head -1 | sed 's/WIGGUM_LOG://' | sed 's/\\"/"/g')
0 commit comments