pi-runline 0.2.1 → 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.
|
@@ -51,13 +51,13 @@ function connectionFor(
|
|
|
51
51
|
return connections.find((c) => c.plugin === plugin);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
function isSchemaEmpty(
|
|
54
|
+
function isSchemaEmpty(
|
|
55
|
+
schema: PluginSummary["connectionConfigSchema"],
|
|
56
|
+
): boolean {
|
|
55
57
|
return !schema || Object.keys(schema).length === 0;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
function envOrSchemaDefault(
|
|
59
|
-
field: ConnectionSchemaField,
|
|
60
|
-
): string | undefined {
|
|
60
|
+
function envOrSchemaDefault(field: ConnectionSchemaField): string | undefined {
|
|
61
61
|
if (field.env && process.env[field.env]) return process.env[field.env];
|
|
62
62
|
if (field.default !== undefined) return String(field.default);
|
|
63
63
|
return undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { Theme } from "@mariozechner/pi-coding-agent";
|
|
1
2
|
import type { Component, TUI } from "@mariozechner/pi-tui";
|
|
2
3
|
import { fuzzyFilter, Input, visibleWidth } from "@mariozechner/pi-tui";
|
|
3
|
-
import type { Theme } from "@mariozechner/pi-coding-agent";
|
|
4
4
|
|
|
5
5
|
export interface PluginPickerItem {
|
|
6
6
|
name: string;
|
|
@@ -86,7 +86,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
86
86
|
typeof message.content === "string"
|
|
87
87
|
? message.content
|
|
88
88
|
: message.content
|
|
89
|
-
.filter(
|
|
89
|
+
.filter(
|
|
90
|
+
(c): c is { type: "text"; text: string } => c.type === "text",
|
|
91
|
+
)
|
|
90
92
|
.map((c) => c.text)
|
|
91
93
|
.join("\n");
|
|
92
94
|
return new Markdown(
|
|
@@ -60,10 +60,7 @@ export function loadExtConfig(runlineDir: string): RunlineExtConfig {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export function savePiPlugins(
|
|
64
|
-
runlineDir: string,
|
|
65
|
-
piPlugins: string[],
|
|
66
|
-
): void {
|
|
63
|
+
export function savePiPlugins(runlineDir: string, piPlugins: string[]): void {
|
|
67
64
|
const configPath = path.join(runlineDir, "config.json");
|
|
68
65
|
let raw: Record<string, unknown> = {};
|
|
69
66
|
if (fs.existsSync(configPath)) {
|
package/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-runline",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Code mode for pi",
|
|
5
5
|
"type": "commonjs",
|
|
6
|
-
"keywords": [
|
|
7
|
-
|
|
6
|
+
"keywords": [
|
|
7
|
+
"pi-package"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
"extensions",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
8
13
|
"pi": {
|
|
9
|
-
"extensions": [
|
|
14
|
+
"extensions": [
|
|
15
|
+
"extensions/runline-context"
|
|
16
|
+
]
|
|
10
17
|
},
|
|
11
18
|
"scripts": {
|
|
12
19
|
"build": "echo 'no build'",
|
|
@@ -14,11 +21,13 @@
|
|
|
14
21
|
"lint": "biome check extensions/",
|
|
15
22
|
"lint:fix": "biome check --write extensions/"
|
|
16
23
|
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"runline": "^0.2.2"
|
|
26
|
+
},
|
|
17
27
|
"peerDependencies": {
|
|
18
28
|
"@mariozechner/pi-coding-agent": "*",
|
|
19
29
|
"@mariozechner/pi-tui": "*",
|
|
20
|
-
"@sinclair/typebox": "*"
|
|
21
|
-
"runline": "^0.2.1"
|
|
30
|
+
"@sinclair/typebox": "*"
|
|
22
31
|
},
|
|
23
32
|
"author": "michaelliv",
|
|
24
33
|
"license": "MIT"
|