pi-interview 0.4.2 → 0.4.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/README.md +2 -8
- package/form/script.js +0 -2
- package/form/styles.css +2 -1
- package/index.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,17 +10,11 @@ https://github.com/user-attachments/assets/52285bd9-956e-4020-aca5-9fbd82916934
|
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
|
-
Clone or copy this directory to your pi-agent extensions folder:
|
|
14
|
-
|
|
15
13
|
```bash
|
|
16
|
-
|
|
17
|
-
git clone https://github.com/nicobailon/pi-interview-tool ~/.pi/agent/extensions/interview
|
|
18
|
-
|
|
19
|
-
# Or copy manually
|
|
20
|
-
cp -r /path/to/interview ~/.pi/agent/extensions/
|
|
14
|
+
pi install npm:pi-interview
|
|
21
15
|
```
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
Restart pi to load the extension.
|
|
24
18
|
|
|
25
19
|
**Requirements:**
|
|
26
20
|
- pi-agent v0.35.0 or later (extensions API)
|
package/form/script.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
const sessionId = data.sessionId || "";
|
|
6
6
|
const cwd = data.cwd || "";
|
|
7
7
|
const gitBranch = data.gitBranch || "";
|
|
8
|
-
const startedAt = data.startedAt || Date.now();
|
|
9
8
|
const timeout = typeof data.timeout === "number" ? data.timeout : 0;
|
|
10
9
|
|
|
11
10
|
const titleEl = document.getElementById("form-title");
|
|
@@ -1822,7 +1821,6 @@
|
|
|
1822
1821
|
function collectResponses() {
|
|
1823
1822
|
return questions.map((question) => {
|
|
1824
1823
|
const resp = { id: question.id, value: getQuestionValue(question) };
|
|
1825
|
-
if (question.type === "image") resp.type = "paths";
|
|
1826
1824
|
if (question.type !== "image") {
|
|
1827
1825
|
const attachPaths = attachments.getPaths(question.id);
|
|
1828
1826
|
if (attachPaths.length > 0) resp.attachments = attachPaths;
|
package/form/styles.css
CHANGED
package/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { StringEnum } from "@mariozechner/pi-ai";
|
|
2
3
|
import { Text } from "@mariozechner/pi-tui";
|
|
3
4
|
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
4
5
|
import * as path from "node:path";
|
|
@@ -77,7 +78,7 @@ const InterviewParams = Type.Object({
|
|
|
77
78
|
theme: Type.Optional(
|
|
78
79
|
Type.Object(
|
|
79
80
|
{
|
|
80
|
-
mode: Type.Optional(
|
|
81
|
+
mode: Type.Optional(StringEnum(["auto", "light", "dark"])),
|
|
81
82
|
name: Type.Optional(Type.String()),
|
|
82
83
|
lightPath: Type.Optional(Type.String()),
|
|
83
84
|
darkPath: Type.Optional(Type.String()),
|