@thoth-agents/pi-thoth-theme 0.0.0-stage → 0.2.0
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 +29 -0
- package/README.md +121 -2
- package/dist/index.ts +3686 -0
- package/package.json +61 -3
- package/themes/thoth.json +104 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 thoth-agents contributors
|
|
4
|
+
Copyright (c) 2026 QuangThai
|
|
5
|
+
Copyright (c) 2025 huynhgiabuu
|
|
6
|
+
Copyright (c) 2026 Michael
|
|
7
|
+
Copyright (c) 2025 Mario Zechner
|
|
8
|
+
|
|
9
|
+
Includes code adapted from pi-omp-theme (QuangThai), the primary source, and
|
|
10
|
+
pi-pretty (huynhgiabuu). pi-atelier (Michael) and gentle-shell (Mario Zechner)
|
|
11
|
+
are reference-only projects; their code is not included in this package.
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,122 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @thoth-agents/pi-thoth-theme
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Modular Thoth styling for Pi, with a gold-on-black Egyptian dark theme.
|
|
4
|
+
|
|
5
|
+
Requires Pi `>=0.99.0` and Node `>=22.19.0`. Development Pi SDK/TUI
|
|
6
|
+
dependencies are pinned to `1.0.2` in the root workspace lockfile.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
From the thoth-agents repository root:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
pi install ./pi-packages/pi-thoth-theme
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Select the `thoth` theme in Pi's theme settings. Theme selection is independent
|
|
17
|
+
of the module toggles below.
|
|
18
|
+
|
|
19
|
+
## Modules
|
|
20
|
+
|
|
21
|
+
- **Status line**: a responsive footer below the input showing cumulative
|
|
22
|
+
session cost (including subagents), main-session input/output totals, cache hit
|
|
23
|
+
percentage and output speed in `tok/s`. Input includes uncached, cache-read and
|
|
24
|
+
cache-write tokens; the hit percentage is cache-read divided by total input
|
|
25
|
+
(`—` when total input is zero). Subagent tokens are excluded. Narrow widths
|
|
26
|
+
drop speed, then cache, then tokens before truncating cost. Editor-border
|
|
27
|
+
metadata is decorated in place without claiming the custom editor slot.
|
|
28
|
+
- **Tools**: boxed calls and results for `read`, `bash`, `powershell`, `ls`,
|
|
29
|
+
`grep`, `find`, `edit` and `write`, with Nerd Font icons, native Unicode
|
|
30
|
+
glyphs or ASCII alternatives. `bash` and `powershell` show a live elapsed time
|
|
31
|
+
while running. Execution and parameters delegate to Pi's built-in tools;
|
|
32
|
+
Pi's native output toggle still
|
|
33
|
+
collapses and expands results. Registered non-built-in tools keep their own
|
|
34
|
+
renderers when their package matches `tools.respectPackages` (including
|
|
35
|
+
thoth-agents and thoth-mem by default). Other tools get a generic frame with
|
|
36
|
+
the tool name, a one-line argument summary, a collapsed text preview, error
|
|
37
|
+
styling and a live elapsed footer. Images keep Pi's native rendering.
|
|
38
|
+
Tool renderers require Pi `>=1.0.1`; they are runtime-guarded and inert on
|
|
39
|
+
older supported Pi versions.
|
|
40
|
+
- **Welcome**: a header with the Thoth logo, Pi version, loaded resources and
|
|
41
|
+
tool providers, and recent sessions. Resource and session details load
|
|
42
|
+
best-effort through public APIs.
|
|
43
|
+
|
|
44
|
+
## Render KIT
|
|
45
|
+
|
|
46
|
+
Provides the Render KIT v1 contract defined by `@thoth-agents/pi-core` for
|
|
47
|
+
first-party tools, custom messages and above-editor widgets. The kit shares this
|
|
48
|
+
package's frames, theme roles, collapse hints and working/elapsed indicators.
|
|
49
|
+
Producers discover it at render time, so extension load order does not matter;
|
|
50
|
+
they do not depend on this package and keep native Pi rendering when it is absent.
|
|
51
|
+
|
|
52
|
+
The theme registers the kit on `session_start` only in interactive UI sessions
|
|
53
|
+
with `tools.enabled: true`, and withdraws only its own registration on
|
|
54
|
+
`session_shutdown`. Headless children neither replace nor withdraw the parent
|
|
55
|
+
kit, and their lifecycle does not stop the parent's indicators. Theme selection
|
|
56
|
+
alone does not enable the kit when tool styling is disabled.
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
Edit `~/.pi/agent/pi-thoth-theme.json` (or
|
|
61
|
+
`$PI_CODING_AGENT_DIR/pi-thoth-theme.json` when that environment variable is set):
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"icons": "nerd",
|
|
66
|
+
"statusLine": {
|
|
67
|
+
"enabled": true,
|
|
68
|
+
"subscriptionProviders": ["claude-bridge"]
|
|
69
|
+
},
|
|
70
|
+
"inputBox": { "enabled": true },
|
|
71
|
+
"tools": {
|
|
72
|
+
"enabled": true,
|
|
73
|
+
"respectPackages": ["thoth-agents", "@thoth-agents/*", "thoth-mem"]
|
|
74
|
+
},
|
|
75
|
+
"welcome": { "enabled": true }
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`icons` accepts `"nerd"` (default), `"unicode"` (native Render KIT glyphs,
|
|
80
|
+
status symbols and animation frames, with Unicode substitutes for Nerd glyphs),
|
|
81
|
+
or `"ascii"` (plain-text alternatives).
|
|
82
|
+
Missing or malformed icon values use `"nerd"`. Each module's `enabled` key
|
|
83
|
+
accepts a boolean and defaults to `true`. Set it to `false` to leave Pi's native
|
|
84
|
+
behavior on that surface. `statusLine.subscriptionProviders` accepts an array of
|
|
85
|
+
provider identifier strings (defaults to `["claude-bridge"]`) to mark
|
|
86
|
+
subscription-backed usage with `(sub)` in the status line cost segment.
|
|
87
|
+
|
|
88
|
+
`inputBox.enabled` defaults to `true` and requires `statusLine.enabled` to be
|
|
89
|
+
`true`. It frames the native editor in a rounded `muted` (sand) box with side borders,
|
|
90
|
+
a dim `type or / for commands` placeholder, and top-left ready or native working
|
|
91
|
+
status (including elapsed seconds). Git branch and working directory appear on
|
|
92
|
+
the top border; model, thinking effort and context usage appear on the bottom.
|
|
93
|
+
Native scroll indicators are preserved. The status line always stays in its
|
|
94
|
+
separate footer row below the box. Narrow widths use the native editor geometry.
|
|
95
|
+
Disable `inputBox` to keep the native editor and the same footer.
|
|
96
|
+
|
|
97
|
+
`tools.respectPackages` accepts an array of non-empty package-name strings.
|
|
98
|
+
The default is `["thoth-agents", "@thoth-agents/*", "thoth-mem"]`. Entries match
|
|
99
|
+
exact package names or a trailing `/*` scope wildcard: `@scope/*` matches
|
|
100
|
+
`@scope/anything`, but not `@scopex/anything`. No other globs are supported.
|
|
101
|
+
A user list **fully replaces** the default; `[]` gives every registered
|
|
102
|
+
non-built-in tool a generic frame, even if it supplies its own renderers.
|
|
103
|
+
Invalid values (including any empty, whitespace-only or non-string entry) use
|
|
104
|
+
the full default list. Package names come from the nearest `package.json`
|
|
105
|
+
walking upward from the tool's source directory. Built-ins always use the
|
|
106
|
+
themed frames; tools absent from Pi's registry keep their own renderers.
|
|
107
|
+
|
|
108
|
+
Configuration is read at extension load; use `/reload` after edits. Missing,
|
|
109
|
+
malformed or invalid values use defaults. Pi settings are never read for
|
|
110
|
+
package configuration.
|
|
111
|
+
|
|
112
|
+
**A Nerd Font is required for the default icons.** Configure your terminal to
|
|
113
|
+
use one, set `"icons": "unicode"` for native glyphs, or use `"icons": "ascii"`
|
|
114
|
+
for plain-text alternatives. Unicode mode substitutes a Unicode glyph where
|
|
115
|
+
the native fallback is a Nerd glyph (agent `⚙`).
|
|
116
|
+
|
|
117
|
+
## Attribution
|
|
118
|
+
|
|
119
|
+
MIT; see [LICENSE](LICENSE). Includes code adapted from the primary upstream,
|
|
120
|
+
[pi-omp-theme](https://github.com/QuangThai/pi-omp-theme) by QuangThai, and
|
|
121
|
+
pi-pretty by huynhgiabuu. pi-atelier by Michael and gentle-shell by Mario Zechner
|
|
122
|
+
are references only, not bundled code.
|