@plannotator/opencode 0.4.2-beta.2 → 0.4.2-beta.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/dist/index.js +19 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -865,7 +865,6 @@ export const CursorOverlay: React.FC<CursorOverlayProps> = ({
|
|
|
865
865
|
|
|
866
866
|
// index.ts
|
|
867
867
|
var htmlContent = plannotator_default;
|
|
868
|
-
var pendingApproval = null;
|
|
869
868
|
var PlannotatorPlugin = async (ctx) => {
|
|
870
869
|
return {
|
|
871
870
|
"experimental.chat.system.transform": async (_input, output) => {
|
|
@@ -885,17 +884,6 @@ based on their feedback and call submit_plan again.
|
|
|
885
884
|
Do NOT proceed with implementation until your plan is approved.
|
|
886
885
|
`);
|
|
887
886
|
},
|
|
888
|
-
"tool.execute.after": async (input, _output) => {
|
|
889
|
-
if (input.tool === "submit_plan" && pendingApproval?.sessionID === input.sessionID) {
|
|
890
|
-
pendingApproval = null;
|
|
891
|
-
try {
|
|
892
|
-
await ctx.client.session.abort({ path: { id: input.sessionID } });
|
|
893
|
-
await ctx.client.tui.executeCommand({ body: { command: "agent_cycle" } });
|
|
894
|
-
await ctx.client.tui.appendPrompt({ body: { text: "Proceed with implementation" } });
|
|
895
|
-
await ctx.client.tui.showToast({ body: { message: "Press Enter to start building" } });
|
|
896
|
-
} catch {}
|
|
897
|
-
}
|
|
898
|
-
},
|
|
899
887
|
tool: {
|
|
900
888
|
submit_plan: tool({
|
|
901
889
|
description: "Submit your completed plan for interactive user review. The user can annotate, approve, or request changes. Call this when you have finished creating your implementation plan.",
|
|
@@ -916,10 +904,25 @@ Do NOT proceed with implementation until your plan is approved.
|
|
|
916
904
|
await Bun.sleep(1500);
|
|
917
905
|
server.stop();
|
|
918
906
|
if (result.approved) {
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
907
|
+
try {
|
|
908
|
+
await ctx.client.tui.executeCommand({
|
|
909
|
+
body: { command: "agent_cycle" }
|
|
910
|
+
});
|
|
911
|
+
} catch {}
|
|
912
|
+
const sessionID = context.sessionID;
|
|
913
|
+
setTimeout(async () => {
|
|
914
|
+
try {
|
|
915
|
+
await ctx.client.session.abort({ path: { id: sessionID } });
|
|
916
|
+
await ctx.client.session.prompt({
|
|
917
|
+
path: { id: sessionID },
|
|
918
|
+
body: {
|
|
919
|
+
agent: "build",
|
|
920
|
+
parts: [{ type: "text", text: "Proceed with implementation" }]
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
} catch {}
|
|
924
|
+
}, 100);
|
|
925
|
+
return `Plan approved! Switching to build mode...
|
|
923
926
|
|
|
924
927
|
Plan Summary: ${args.summary}`;
|
|
925
928
|
} else {
|
package/package.json
CHANGED