pi-spark 0.6.2 → 0.6.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.
package/README.md
CHANGED
|
@@ -10,9 +10,9 @@ A small, opinionated collection of [pi](https://pi.dev/) extensions.
|
|
|
10
10
|
- **Editor:** replaces the default editor with a compact working indicator (inspired by [Amp](https://ampcode.com/)) and current model info.
|
|
11
11
|
- **Footer:** shows session information, extension statuses, cost, and context usage on one line.
|
|
12
12
|
- **Fullscreen:** clears the screen and scrollback on session start, pins the editor and footer to the bottom for a full-screen session, and clears again on exit.
|
|
13
|
+
- **Name:** exposes a `name` tool so the agent can give the current session a concise, recognizable name in the session selector.
|
|
13
14
|
- **Presets:** switches named model presets with `/preset`, `--preset`, and quick cycle shortcuts.
|
|
14
15
|
- **Recap:** generates a short idle-session recap and exposes a `/recap` command for manual generation, inspired by [Claude Code's session recap](https://code.claude.com/docs/en/interactive-mode#session-recap).
|
|
15
|
-
- **Set session name:** exposes a `set_session_name` tool so the agent can give the current session a concise, recognizable name in the session selector.
|
|
16
16
|
- **Trust all:** bypasses pi's project trust dialog, added in 0.79.0, and removes saved trust decisions so startup stays minimal.
|
|
17
17
|
|
|
18
18
|

|
|
@@ -82,6 +82,10 @@ Example:
|
|
|
82
82
|
|
|
83
83
|
- pi-spark clears the screen and scrollback at session start and exit, pins the editor and footer to the bottom, and enables pi's `clearOnShrink` behavior programmatically so pinned UI stays aligned after taller components close.
|
|
84
84
|
|
|
85
|
+
### Name
|
|
86
|
+
|
|
87
|
+
- The agent can set or refresh the current session's name and optionally give a reason.
|
|
88
|
+
|
|
85
89
|
### Presets
|
|
86
90
|
|
|
87
91
|
- Each key under `presets` defines a named model preset with `provider`, `model`, and optional `thinkingLevel` fields.
|
|
@@ -97,10 +101,6 @@ Use presets in these ways:
|
|
|
97
101
|
- pi-spark can generate a short recap after the session has been idle or when you run `/recap` manually.
|
|
98
102
|
- The `recap.idle` value is in milliseconds and must be at least `5000`. The recap model can be customized with `provider`, `model`, and `thinkingLevel`.
|
|
99
103
|
|
|
100
|
-
### Set session name
|
|
101
|
-
|
|
102
|
-
- The agent can set or refresh the current session's display name and optionally give a reason.
|
|
103
|
-
|
|
104
104
|
### Trust all
|
|
105
105
|
|
|
106
106
|
- pi-spark always answers pi's project trust check with `yes` and removes `~/.pi/agent/trust.json` on startup.
|
|
@@ -10,29 +10,29 @@ export default function (pi: ExtensionAPI) {
|
|
|
10
10
|
pi.on("session_start", (_event, ctx) => {
|
|
11
11
|
if (!ctx.hasUI) return;
|
|
12
12
|
|
|
13
|
-
const config = loadConfig(ctx, "
|
|
13
|
+
const config = loadConfig(ctx, "name");
|
|
14
14
|
if (!config) return;
|
|
15
15
|
|
|
16
16
|
pi.registerTool({
|
|
17
|
-
name: "
|
|
18
|
-
label: "
|
|
17
|
+
name: "name",
|
|
18
|
+
label: "name",
|
|
19
19
|
description:
|
|
20
|
-
"Set or refresh the current session's
|
|
20
|
+
"Set or refresh the current session's concise name, shown in the session selector " +
|
|
21
21
|
"instead of the first-message preview. Use this when a concise name would make the " +
|
|
22
22
|
"session easier to recognize later, such as after a long opening prompt or a substantial " +
|
|
23
23
|
"topic shift.",
|
|
24
|
-
promptSnippet: "Set or refresh the current session's concise
|
|
24
|
+
promptSnippet: "Set or refresh the current session's concise name",
|
|
25
25
|
promptGuidelines: [
|
|
26
|
-
"Use
|
|
27
|
-
"Use
|
|
28
|
-
"Include a concise
|
|
26
|
+
"Use name when the session would benefit from a concise, recognizable name, especially after a long, vague, or pasted opening prompt.",
|
|
27
|
+
"Use name to refresh the session's name only after a substantial shift in the conversation's focus; do not rename for minor follow-ups.",
|
|
28
|
+
"Include a concise reason for name when it would help explain why the name identifies the session.",
|
|
29
29
|
],
|
|
30
30
|
parameters: Type.Object({
|
|
31
31
|
name: Type.String({
|
|
32
32
|
minLength: 1,
|
|
33
33
|
maxLength: 120,
|
|
34
34
|
description:
|
|
35
|
-
"Concise session
|
|
35
|
+
"Concise session name. Use a short, recognizable phrase in sentence case, " +
|
|
36
36
|
"ideally <= 72 characters. Do not use surrounding quotes, trailing punctuation, or " +
|
|
37
37
|
"generic prefixes like \"Chat about\". Examples: \"Refactor auth module\", " +
|
|
38
38
|
"\"Debug flaky CI pipeline\", \"Draft Q3 planning doc\".",
|
|
@@ -53,7 +53,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
53
53
|
const reason = sanitizeText(args.reason ?? "");
|
|
54
54
|
|
|
55
55
|
const container = new Container();
|
|
56
|
-
container.addChild(new Text(`${theme.bold(theme.fg("toolTitle", "
|
|
56
|
+
container.addChild(new Text(`${theme.bold(theme.fg("toolTitle", "name"))} ${theme.fg("accent", name)}`, 0, 0));
|
|
57
57
|
|
|
58
58
|
if (reason) {
|
|
59
59
|
container.addChild(new Spacer(1));
|
|
@@ -4,18 +4,18 @@ import { codexUsageConfigSchema } from "../../codex-usage/config";
|
|
|
4
4
|
import { editorConfigSchema } from "../../editor/config";
|
|
5
5
|
import { footerConfigSchema } from "../../footer/config";
|
|
6
6
|
import { fullscreenConfigSchema } from "../../fullscreen/config";
|
|
7
|
+
import { nameConfigSchema } from "../../name/config";
|
|
7
8
|
import { presetsConfigSchema } from "../../presets/config";
|
|
8
9
|
import { recapConfigSchema } from "../../recap/config";
|
|
9
|
-
import { setSessionNameConfigSchema } from "../../set-session-name/config";
|
|
10
10
|
|
|
11
11
|
export const configSchemas = {
|
|
12
12
|
codexUsage: codexUsageConfigSchema,
|
|
13
13
|
editor: editorConfigSchema,
|
|
14
14
|
footer: footerConfigSchema,
|
|
15
15
|
fullscreen: fullscreenConfigSchema,
|
|
16
|
+
name: nameConfigSchema,
|
|
16
17
|
presets: presetsConfigSchema,
|
|
17
18
|
recap: recapConfigSchema,
|
|
18
|
-
setSessionName: setSessionNameConfigSchema,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export type ConfigField = keyof typeof configSchemas;
|
package/package.json
CHANGED