omp-auto-loop 0.2.0 → 0.2.2
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/index.ts +3 -4
- package/package.json +5 -3
- package/test-run.ts +2 -0
- package/tool.ts +1 -1
package/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ExtensionAPI, ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { getLoopControlToolDefinition, handleLoopControlTool, renderLoopControlCall, renderLoopControlResult } from "./tool.js";
|
|
2
|
+
import { buildPrompt, emptyState, getSystemPromptAddition, type LoopState, updateWidget } from "./state.ts";
|
|
3
|
+
import { getLoopControlToolDefinition, handleLoopControlTool, renderLoopControlCall, renderLoopControlResult } from "./tool.ts";
|
|
5
4
|
|
|
6
5
|
export default function (pi: ExtensionAPI) {
|
|
7
6
|
let state = emptyState();
|
|
@@ -106,7 +105,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
106
105
|
handler: async (_args, ctx) => stopLoop(ctx, "Stopped by user"),
|
|
107
106
|
});
|
|
108
107
|
|
|
109
|
-
pi.registerShortcut(
|
|
108
|
+
pi.registerShortcut("ctrl+shift+x", {
|
|
110
109
|
description: "Stop the active loop",
|
|
111
110
|
handler: async (ctx) => {
|
|
112
111
|
stopLoop(ctx, "Stopped by shortcut");
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omp-auto-loop",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "General-purpose auto agent loop plugin for omp.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.ts",
|
|
5
7
|
"keywords": [
|
|
6
8
|
"omp-plugin"
|
|
7
9
|
],
|
|
8
10
|
"license": "MIT",
|
|
9
11
|
"pi": {
|
|
10
12
|
"extensions": [
|
|
11
|
-
"."
|
|
13
|
+
"index.ts"
|
|
12
14
|
]
|
|
13
15
|
},
|
|
14
16
|
"omp": {
|
|
15
17
|
"extensions": [
|
|
16
|
-
"."
|
|
18
|
+
"index.ts"
|
|
17
19
|
]
|
|
18
20
|
},
|
|
19
21
|
"peerDependencies": {
|
package/test-run.ts
ADDED
package/tool.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { StringEnum } from "@oh-my-pi/pi-ai";
|
|
|
2
2
|
import type { ExtensionAPI, ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
3
3
|
import { Text } from "@oh-my-pi/pi-tui";
|
|
4
4
|
import { Type } from "@sinclair/typebox";
|
|
5
|
-
import { buildPrompt, type LoopState } from "./state.
|
|
5
|
+
import { buildPrompt, type LoopState } from "./state.ts";
|
|
6
6
|
|
|
7
7
|
export function handleLoopControlTool(opts: {
|
|
8
8
|
params: { status: "next" | "done"; summary: string; reason?: string };
|