@plannotator/opencode 0.4.2-beta.2 → 0.4.2-beta.3

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -15
  2. 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,11 +904,22 @@ 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
- pendingApproval = { sessionID: context.sessionID };
907
+ try {
908
+ await ctx.client.tui.executeCommand({
909
+ body: { command: "agent_cycle" }
910
+ });
911
+ } catch {}
912
+ try {
913
+ await ctx.client.session.prompt({
914
+ path: { id: context.sessionID },
915
+ body: {
916
+ agent: "build",
917
+ parts: [{ type: "text", text: "Proceed with implementation" }]
918
+ }
919
+ });
920
+ } catch {}
920
921
  return `Plan approved!
921
922
 
922
- Your plan has been approved by the user.
923
-
924
923
  Plan Summary: ${args.summary}`;
925
924
  } else {
926
925
  return `Plan needs revision.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plannotator/opencode",
3
- "version": "0.4.2-beta.2",
3
+ "version": "0.4.2-beta.3",
4
4
  "description": "Plannotator plugin for OpenCode - interactive plan review with visual annotation",
5
5
  "author": "backnotprop",
6
6
  "license": "BSL-1.1",