@leolastforce/chalice-welcome-screen 0.0.0-stage → 0.1.10
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/LICENSE +21 -0
- package/README.md +140 -2
- package/package.json +62 -4
- package/src/index.ts +1989 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 leolastforce, heavily modified version of original by Kaushik Gopal, also under MIT.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,141 @@
|
|
|
1
|
-
|
|
1
|
+
> This is a chalice package, check out github.com/leolastforce/Chalice
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
> This is a heavily modified fork of pi-kaush's welcome screen (it was used as the foundation)
|
|
4
|
+
|
|
5
|
+
> Text past here is generated docs
|
|
6
|
+
|
|
7
|
+
# Header screen
|
|
8
|
+
|
|
9
|
+
Replaces Pi's startup header (the banner above the chat) with Chalice's own. Four banner modes,
|
|
10
|
+
two logos, four logo color schemes, a rotating tip, recent sessions, and startup health warnings
|
|
11
|
+
for installed extension packages. Works on stock Pi and installs on its own.
|
|
12
|
+
|
|
13
|
+
## Banner modes
|
|
14
|
+
|
|
15
|
+
Set with `chalice.headerBanner`.
|
|
16
|
+
|
|
17
|
+
| Mode | What it draws |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `full` (default) | Centered framed header: logo, version and optional welcome line on the left; `[Line Operators]`, `[Recent Sessions]` and the tip on the right. On narrow terminals the two columns stack. |
|
|
20
|
+
| `simple` | Centered logo, version/welcome line and the tip. No frame, no sessions, no operators. |
|
|
21
|
+
| `compact` | A small box with `Chalice v<version>`, the model and the working directory. |
|
|
22
|
+
| `none` | No banner at all. |
|
|
23
|
+
|
|
24
|
+
All modes remove Pi's native startup resource sections (`[Context]`, `[Skills]`, `[Prompts]`,
|
|
25
|
+
`[Extensions]`, `[Themes]`) and restore them when the header is disposed. `full` renders its own
|
|
26
|
+
summary instead; the parsed extension names are used for the health check described below. If Pi's
|
|
27
|
+
resource panel layout cannot be recognized, `full` shows a layout notice and leaves the native
|
|
28
|
+
panel alone.
|
|
29
|
+
|
|
30
|
+
## Logo
|
|
31
|
+
|
|
32
|
+
`chalice.logoType` selects the art:
|
|
33
|
+
|
|
34
|
+
| Value | Art |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `square` (default) | A 12-column hollow square. |
|
|
37
|
+
| `pi` | A compact Pi glyph. |
|
|
38
|
+
|
|
39
|
+
`chalice.logoColor` selects how it is tinted:
|
|
40
|
+
|
|
41
|
+
| Value | Effect |
|
|
42
|
+
|---|---|
|
|
43
|
+
| `gradient` (default) | The theme accent, brightened toward the middle of the logo. Needs a 24-bit accent; falls back to flat accent otherwise. |
|
|
44
|
+
| `accent` | Flat theme accent. |
|
|
45
|
+
| `white` | Fixed near-white, independent of the theme. |
|
|
46
|
+
| `pi` | Pi's brand ramp (coral → blue → yellow) along the diagonal, independent of the theme. |
|
|
47
|
+
|
|
48
|
+
## What full mode shows
|
|
49
|
+
|
|
50
|
+
- **Brand block:** `v<version> [theme name]`, and `Welcome back, <name>` when a username is set.
|
|
51
|
+
- **[Line Operators]:** `/` commands, skills and prompts; `@` file references; `!` shell output to
|
|
52
|
+
the model; `!!` shell output without sending it.
|
|
53
|
+
- **[Recent Sessions]:** up to three other sessions in this project, newest first, with a compact
|
|
54
|
+
age (`now`, `3h`, `2d`, `5mo`, `1y`). A session's name is used, or its first message when unnamed.
|
|
55
|
+
- **Tip:** one per startup, cycling through a persisted pool.
|
|
56
|
+
|
|
57
|
+
## Extension health check
|
|
58
|
+
|
|
59
|
+
After Pi's startup resources are captured, npm-installed extension packages are checked in the
|
|
60
|
+
background. The registry's latest version is fetched with a 3-second timeout and compared against
|
|
61
|
+
the installed version and the pinned range. The check also looks for missing declared dependencies
|
|
62
|
+
and bare imports that are not in `dependencies`/`peerDependencies`.
|
|
63
|
+
|
|
64
|
+
| Severity | Meaning |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `blocked` | The pinned range cannot reach the latest major, or a dependency is missing. |
|
|
67
|
+
| `behind` | A newer version is available. |
|
|
68
|
+
| `odd` | The entry point has undeclared imports. |
|
|
69
|
+
| `ok` | Nothing to report. |
|
|
70
|
+
|
|
71
|
+
Problems are shown through `ctx.ui.notify` as a warning, or as an error if anything is blocked.
|
|
72
|
+
Local and source-path extensions are skipped, as is the loader-backed `@earendil-works` scope.
|
|
73
|
+
The check is best-effort: it never blocks the header from rendering, ignores an unreachable
|
|
74
|
+
registry, and is aborted when the header is disposed.
|
|
75
|
+
|
|
76
|
+
## Settings
|
|
77
|
+
|
|
78
|
+
All keys live under `chalice` in `~/.pi/agent/settings.json`, or in a trusted project's
|
|
79
|
+
`.pi/settings.json`. They are also in the **Header** section of `/chalicesettings` when the
|
|
80
|
+
`chalice-settings` module is installed. Changes apply immediately — the header is recreated on
|
|
81
|
+
`chalice:settings-changed` without restarting the session.
|
|
82
|
+
|
|
83
|
+
| Key | Type | Default | Options |
|
|
84
|
+
|---|---|---|---|
|
|
85
|
+
| `headerBanner` | enum | `full` | `full`, `simple`, `compact`, `none` |
|
|
86
|
+
| `logoType` | enum | `square` | `square`, `pi` |
|
|
87
|
+
| `logoColor` | enum | `gradient` | `gradient`, `accent`, `white`, `pi` |
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"chalice": {
|
|
92
|
+
"headerBanner": "simple",
|
|
93
|
+
"logoType": "pi",
|
|
94
|
+
"logoColor": "pi"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Tips
|
|
100
|
+
|
|
101
|
+
Tips cycle through a pool, with the cursor persisted so each startup shows the next one. Override
|
|
102
|
+
the built-in list in `~/.pi/agent/extensions/welcome-screen/welcome.json`:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"tips": ["Your tip here", "Another one"],
|
|
107
|
+
"tipIndex": 0
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`tips` must be a non-empty array of strings; a missing or malformed file falls back to the built-in
|
|
112
|
+
list. `tipIndex` is advanced by the module on each startup. Tips are hidden in `compact` and `none`
|
|
113
|
+
modes.
|
|
114
|
+
|
|
115
|
+
## Standalone behavior
|
|
116
|
+
|
|
117
|
+
- No `chalice-basics` → no username, so no `Welcome back` line.
|
|
118
|
+
- No `chalice-settings` → no settings UI; the section registration is a no-op, so edit the JSON.
|
|
119
|
+
- No other Chalice module is required. The header reads Pi's own startup resource panel, which it
|
|
120
|
+
handles across the older (0.80–0.84) and current (1.5+) component shapes.
|
|
121
|
+
- Only the interactive TUI is affected; RPC and print modes are untouched.
|
|
122
|
+
|
|
123
|
+
## Source layout
|
|
124
|
+
|
|
125
|
+
Everything lives in `src/index.ts` (~2000 lines): Pi wiring and the settings section, banner art and
|
|
126
|
+
ANSI coloring, the resource-panel bridge, the four render functions, recent-session loading, tip
|
|
127
|
+
persistence, and the health check.
|
|
128
|
+
|
|
129
|
+
## Development
|
|
130
|
+
|
|
131
|
+
From the repo root:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
./distro/run-tui.sh # launch the distro with this module
|
|
135
|
+
node distro/harness.mjs # load every package alone and together
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
|
|
140
|
+
MIT. This is a heavily modified fork of `@pi-kaush/pi-welcome-screen` 0.1.10 by Kaushik Gopal;
|
|
141
|
+
attribution is in [CREDITS.md](../../CREDITS.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leolastforce/chalice-welcome-screen",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.10",
|
|
4
|
+
"description": "Chalice module for header screens",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "leolastforce",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": "./src/index.ts",
|
|
9
|
+
"types": "./src/index.ts",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"chalice",
|
|
12
|
+
"pi",
|
|
13
|
+
"pi-package",
|
|
14
|
+
"pi-extension",
|
|
15
|
+
"welcome-screen",
|
|
16
|
+
"terminal-ui"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "https://github.com/leolastforce/Chalice",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/leolastforce/Chalice"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/leolastforce/Chalice.git",
|
|
25
|
+
"directory": "extensions/pi-welcome-screen"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"assets",
|
|
29
|
+
"src",
|
|
30
|
+
"CHANGELOG.md",
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"README.md"
|
|
33
|
+
],
|
|
34
|
+
"pi": {
|
|
35
|
+
"extensions": [
|
|
36
|
+
"./src/index.ts"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@leolastforce/chalice-shared": "0.1.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@earendil-works/pi-coding-agent": ">=0.80.6",
|
|
44
|
+
"@earendil-works/pi-tui": ">=0.80.6"
|
|
45
|
+
},
|
|
46
|
+
"peerDependenciesMeta": {
|
|
47
|
+
"@earendil-works/pi-coding-agent": {
|
|
48
|
+
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"@earendil-works/pi-tui": {
|
|
51
|
+
"optional": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=20"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"package:check": "node ./scripts/check-package.mjs"
|
|
62
|
+
},
|
|
63
|
+
"sideEffects": false
|
|
64
|
+
}
|