autopilot-code 0.2.3 → 0.2.4
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/package.json
CHANGED
|
@@ -147,7 +147,21 @@ Provide your analysis and plan in a clear, structured format. Focus on WHAT need
|
|
|
147
147
|
|
|
148
148
|
# Run opencode to generate the plan
|
|
149
149
|
cd "$WORKTREE"
|
|
150
|
-
|
|
150
|
+
RAW_OUTPUT=$("$OPENCODE_BIN" run "$PLANNING_PROMPT" 2>&1 || echo "Planning failed")
|
|
151
|
+
|
|
152
|
+
# Filter out noise - keep only the final plan output
|
|
153
|
+
# Remove tool calls, internal logs, and system messages
|
|
154
|
+
PLAN_OUTPUT=$(echo "$RAW_OUTPUT" | grep -vE '^\s*(bash|read|write|edit|grep|glob|question|task|webfetch|google_search|morph-mcp|todowrite|todoread|skill|search)\s' | \
|
|
155
|
+
grep -vE '^\s*(Running|Executing|File:|Offset:|Limit:|parameters:|pattern:|path:|include:)' | \
|
|
156
|
+
grep -vE '^<[a-z_]+>|^<\/[a-z_]+>|^system:|^user:|^assistant:|^model:' | \
|
|
157
|
+
grep -vE '^\s*\$|^\s*\[.*\]|^Using|Called|Invoked' | \
|
|
158
|
+
grep -vE '^\s*$|^(command|description|filePath|oldString|newString|questions|header|options):' | \
|
|
159
|
+
tail -100)
|
|
160
|
+
|
|
161
|
+
# If filtering removed everything, use a fallback
|
|
162
|
+
if [[ -z "$PLAN_OUTPUT" ]]; then
|
|
163
|
+
PLAN_OUTPUT="Unable to extract a clean plan. The raw output contained excessive tool logs."
|
|
164
|
+
fi
|
|
151
165
|
|
|
152
166
|
# Post the plan as a comment on the issue
|
|
153
167
|
PLAN_COMMENT="## 📋 Implementation Plan
|