@ryan_nookpi/pi-extension-ask-user-question 0.3.5 → 0.4.1
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/controller.ts +1 -1
- package/form-ui.test.ts +1 -1
- package/form-ui.ts +2 -2
- package/index.test.ts +1 -1
- package/index.ts +1 -1
- package/output.ts +1 -1
- package/package.json +14 -3
- package/schema.ts +1 -2
- package/view.ts +1 -1
package/controller.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Key, matchesKey } from "@
|
|
1
|
+
import { Key, matchesKey } from "@earendil-works/pi-tui";
|
|
2
2
|
|
|
3
3
|
import { allRequiredAnswered, buildAnswers, optionCount, saveOtherAnswer, saveTextAnswer } from "./state.ts";
|
|
4
4
|
import type { AnswerState, EditorAdapter, FormResult, NormalizedQuestion, RenderTheme } from "./types.ts";
|
package/form-ui.test.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtensionContext } from "@
|
|
1
|
+
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { describe, expect, it, vi } from "vitest";
|
|
3
3
|
|
|
4
4
|
import { createEditorTheme, runAskUserQuestionForm } from "./form-ui.ts";
|
package/form-ui.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExtensionContext } from "@
|
|
2
|
-
import { Editor, type EditorTheme } from "@
|
|
1
|
+
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { Editor, type EditorTheme } from "@earendil-works/pi-tui";
|
|
3
3
|
|
|
4
4
|
import { createFormController } from "./controller.ts";
|
|
5
5
|
import { createAnswerState } from "./state.ts";
|
package/index.test.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtensionContext } from "@
|
|
1
|
+
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { describe, expect, it, vi } from "vitest";
|
|
3
3
|
|
|
4
4
|
import { createExtensionApiMock } from "../../tests/mock-extension-api.ts";
|
package/index.ts
CHANGED
package/output.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryan_nookpi/pi-extension-ask-user-question",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "AskUserQuestion tool extension for pi.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,10 +26,21 @@
|
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
29
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
30
|
+
"@earendil-works/pi-tui": "*",
|
|
31
31
|
"@sinclair/typebox": "*"
|
|
32
32
|
},
|
|
33
|
+
"peerDependenciesMeta": {
|
|
34
|
+
"@earendil-works/pi-coding-agent": {
|
|
35
|
+
"optional": true
|
|
36
|
+
},
|
|
37
|
+
"@earendil-works/pi-tui": {
|
|
38
|
+
"optional": true
|
|
39
|
+
},
|
|
40
|
+
"@sinclair/typebox": {
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
33
44
|
"publishConfig": {
|
|
34
45
|
"access": "public"
|
|
35
46
|
}
|
package/schema.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { StringEnum } from "@mariozechner/pi-ai";
|
|
2
1
|
import { Type } from "@sinclair/typebox";
|
|
3
2
|
|
|
4
3
|
export const OptionSchema = Type.Object({
|
|
@@ -14,7 +13,7 @@ export const LooseOptionSchema = Type.Union([
|
|
|
14
13
|
|
|
15
14
|
export const QuestionSchema = Type.Object({
|
|
16
15
|
id: Type.Optional(Type.String({ description: "질문 고유 식별자. 생략 시 q1, q2...로 자동 생성" })),
|
|
17
|
-
type:
|
|
16
|
+
type: Type.Union([Type.Literal("radio"), Type.Literal("checkbox"), Type.Literal("text")], {
|
|
18
17
|
description: "질문 유형: radio(단일 선택), checkbox(복수 선택), text(자유 입력)",
|
|
19
18
|
}),
|
|
20
19
|
prompt: Type.Optional(Type.String({ description: "사용자에게 표시할 질문 문구" })),
|
package/view.ts
CHANGED