sideby 0.22.0 → 0.23.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/ai-tasks.json +14 -0
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.d.ts +7 -0
- package/dist/src/cli/commands.js +326 -21
- package/dist/src/cli/json-schemas.js +76 -1
- package/dist/src/cli/main.js +32 -4
- package/dist/src/core/ask.js +6 -1
- package/dist/src/core/config.d.ts +5 -1
- package/dist/src/core/config.js +18 -3
- package/dist/src/core/quota-levels.d.ts +7 -2
- package/dist/src/core/quota-levels.js +13 -3
- package/dist/src/core/themes.d.ts +107 -0
- package/dist/src/core/themes.js +463 -0
- package/dist/src/menubar/snapshot.d.ts +10 -0
- package/dist/src/menubar/snapshot.js +14 -6
- package/dist/src/menubar/strings.d.ts +6 -0
- package/dist/src/menubar/strings.js +6 -0
- package/dist/src/panel/handler.d.ts +2 -0
- package/dist/src/panel/handler.js +125 -1
- package/dist/src/panel/i18n.d.ts +49 -0
- package/dist/src/panel/i18n.js +104 -6
- package/dist/src/panel/page-logic.d.ts +20 -1
- package/dist/src/panel/page-logic.js +41 -0
- package/dist/src/panel/page-script.js +264 -35
- package/dist/src/panel/page-styles.d.ts +2 -0
- package/dist/src/panel/page-styles.js +57 -31
- package/dist/src/panel/theme.d.ts +6 -1
- package/dist/src/panel/theme.js +4 -0
- package/dist/src/panel/themes.d.ts +14 -0
- package/dist/src/panel/themes.js +162 -0
- package/dist/src/runtime.d.ts +4 -0
- package/package.json +1 -1
- package/schemas/config.json +29 -1
- package/schemas/families.json +5 -0
- package/schemas/hide.json +157 -0
- package/schemas/list.json +10 -0
- package/schemas/order.json +26 -1
- package/schemas/pin.json +17 -0
- package/schemas/theme-check.json +140 -0
- package/schemas/theme-export.json +86 -0
- package/schemas/theme-import.json +92 -0
- package/schemas/theme-preview.json +86 -0
- package/schemas/theme-remove.json +87 -0
- package/schemas/theme-use.json +88 -0
- package/schemas/theme.json +137 -0
- package/schemas/unhide.json +157 -0
- package/schemas/unpin.json +17 -0
- package/skills/sideby/SKILL.md +3 -1
- package/skills/sideby/references/ai-tasks.md +1 -1
- package/skills/sideby/references/panel.md +9 -0
- package/skills/sideby/references/quota.md +1 -1
- package/skills/sideby/references/themes.md +47 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "sideby/theme.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schemaVersion",
|
|
7
|
+
"folder",
|
|
8
|
+
"themes"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"schemaVersion": {
|
|
12
|
+
"type": "number",
|
|
13
|
+
"const": 1
|
|
14
|
+
},
|
|
15
|
+
"folder": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Where Theme Files go, with ~ for the home folder."
|
|
18
|
+
},
|
|
19
|
+
"themes": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": [
|
|
24
|
+
"id",
|
|
25
|
+
"name",
|
|
26
|
+
"source",
|
|
27
|
+
"active",
|
|
28
|
+
"problems",
|
|
29
|
+
"warnings"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"id": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The name to pass to `sideby theme use`."
|
|
35
|
+
},
|
|
36
|
+
"name": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"source": {
|
|
40
|
+
"anyOf": [
|
|
41
|
+
{
|
|
42
|
+
"type": "string",
|
|
43
|
+
"const": "builtin"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "string",
|
|
47
|
+
"const": "file"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"path": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
},
|
|
54
|
+
"active": {
|
|
55
|
+
"type": "boolean"
|
|
56
|
+
},
|
|
57
|
+
"problems": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"description": "Why the Theme cannot be used; empty when it can."
|
|
63
|
+
},
|
|
64
|
+
"warnings": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"description": "Keys of the file that were ignored."
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"_notice": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"properties": {
|
|
77
|
+
"update": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"required": [
|
|
80
|
+
"current",
|
|
81
|
+
"latest",
|
|
82
|
+
"command",
|
|
83
|
+
"message"
|
|
84
|
+
],
|
|
85
|
+
"properties": {
|
|
86
|
+
"current": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"latest": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"command": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
|
|
95
|
+
},
|
|
96
|
+
"message": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"skill": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"required": [
|
|
104
|
+
"installed",
|
|
105
|
+
"current",
|
|
106
|
+
"command",
|
|
107
|
+
"message"
|
|
108
|
+
],
|
|
109
|
+
"properties": {
|
|
110
|
+
"installed": {
|
|
111
|
+
"anyOf": [
|
|
112
|
+
{
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "null"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"description": "The skill's version; null when it has none."
|
|
120
|
+
},
|
|
121
|
+
"current": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
"command": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
|
|
127
|
+
},
|
|
128
|
+
"message": {
|
|
129
|
+
"type": "string"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"description": "Not the answer to the task: mention it briefly afterwards and offer to update."
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "sideby/unhide.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schemaVersion",
|
|
7
|
+
"target",
|
|
8
|
+
"kind",
|
|
9
|
+
"hidden",
|
|
10
|
+
"changed",
|
|
11
|
+
"message",
|
|
12
|
+
"display"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"schemaVersion": {
|
|
16
|
+
"type": "number",
|
|
17
|
+
"const": 1
|
|
18
|
+
},
|
|
19
|
+
"target": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "The Family id or account ref that was hidden or shown again."
|
|
22
|
+
},
|
|
23
|
+
"kind": {
|
|
24
|
+
"anyOf": [
|
|
25
|
+
{
|
|
26
|
+
"type": "string",
|
|
27
|
+
"const": "family"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "string",
|
|
31
|
+
"const": "account"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"hidden": {
|
|
36
|
+
"type": "boolean"
|
|
37
|
+
},
|
|
38
|
+
"changed": {
|
|
39
|
+
"type": "boolean"
|
|
40
|
+
},
|
|
41
|
+
"message": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"display": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"families": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"accounts": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"patternProperties": {
|
|
56
|
+
"^.*$": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"pinned": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"patternProperties": {
|
|
67
|
+
"^.*$": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"hiddenFamilies": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"hidden": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"patternProperties": {
|
|
84
|
+
"^.*$": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"_notice": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"update": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"required": [
|
|
100
|
+
"current",
|
|
101
|
+
"latest",
|
|
102
|
+
"command",
|
|
103
|
+
"message"
|
|
104
|
+
],
|
|
105
|
+
"properties": {
|
|
106
|
+
"current": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"latest": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"command": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
|
|
115
|
+
},
|
|
116
|
+
"message": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"skill": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"required": [
|
|
124
|
+
"installed",
|
|
125
|
+
"current",
|
|
126
|
+
"command",
|
|
127
|
+
"message"
|
|
128
|
+
],
|
|
129
|
+
"properties": {
|
|
130
|
+
"installed": {
|
|
131
|
+
"anyOf": [
|
|
132
|
+
{
|
|
133
|
+
"type": "string"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "null"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"description": "The skill's version; null when it has none."
|
|
140
|
+
},
|
|
141
|
+
"current": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"command": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
|
|
147
|
+
},
|
|
148
|
+
"message": {
|
|
149
|
+
"type": "string"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"description": "Not the answer to the task: mention it briefly afterwards and offer to update."
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
package/schemas/unpin.json
CHANGED
|
@@ -57,6 +57,23 @@
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
+
},
|
|
61
|
+
"hiddenFamilies": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"hidden": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"patternProperties": {
|
|
70
|
+
"^.*$": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
60
77
|
}
|
|
61
78
|
}
|
|
62
79
|
},
|
package/skills/sideby/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sideby
|
|
3
3
|
description: Use when the user runs, or wants to run, several AI coding accounts (Claude Code, Codex, Grok Build, pi) side by side. Covers installing sideby and setting up a new account ("install sideby", "set up another Claude account", "add cc008", "配置一个 cc00x", "再加一个 Codex 账号"), explaining what accounts share and what stays separate ("what do my accounts share?", "这些账号共享了什么"), showing which account a session is ("show [cc001] in the status line", "加上账号标识"), finding a past session of any account ("找一下我上周改登录页的那个会话"), seeing accounts, quota and usage, moving on when one hits its 5-hour or weekly limit, moving the current task to another account ("用 cc008 继续", "交回 cc008"), adding a short command (alias) or a pick command that starts whichever account has the most quota ("加个 cc"), adding an API account from a vendor's docs ("加一个 DeepSeek API 账号"), supporting a new tool, and repairing drifted account directories (skills, hooks, rules or settings not shared, wrong symlinks, credential file permissions). Drives the `sideby` CLI with `--json`; the agent does every step except browser sign-in, filling in secrets and starting interactive sessions, which it hands to the user as one command (inside an Auto Handoff session, `sideby handoff ready --to` moves the task itself).
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.
|
|
5
|
+
version: "0.23.0"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|
|
@@ -47,11 +47,13 @@ Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique
|
|
|
47
47
|
| Know what accounts share and what stays separate | `sideby families <family> --json` | `references/sharing.md` |
|
|
48
48
|
| See accounts, health, quota and usage | `sideby list --json`, `sideby doctor --json`, `sideby quota --json` | `references/diagnose.md` |
|
|
49
49
|
| Pin accounts or arrange their Display Order | `sideby order --json`, `sideby pin <ref> --json`, `sideby unpin <ref> --json` | `references/panel.md` |
|
|
50
|
+
| Hide or show a tool or an account in the lists ("too many shown", "hide pi") | `sideby hide <family\|ref> --json`, `sideby unhide <family\|ref> --json`, `sideby list --all` | `references/panel.md` |
|
|
50
51
|
| Turn quota checks on or off, or fix outdated Codex/Grok quota | `sideby quota check <family> on|off --json`, `sideby quota [family] --refresh --json` | `references/quota.md` |
|
|
51
52
|
| Set the model, effort or Remote Control | `sideby model <ref> --json`, `sideby remote-control --json` | `references/panel.md` |
|
|
52
53
|
| Start sideby at login ("开机启动", "start the panel when I log in") | `sideby autostart --json`, `sideby autostart on --json` (exit 10 first) | `references/panel.md` |
|
|
53
54
|
| Show quota in the macOS menu bar ("状态栏显示额度", "menu bar"), its icon is missing ("状态栏没有图标"), or change its shortcut ("换个快捷键", "帮我挑个顺手的快捷键") | `sideby menubar --json`, `sideby menubar on --json` (exit 10 first), `sideby menubar snapshot --json`, `sideby menubar hotkey [<keys>] --json` | `references/panel.md` |
|
|
54
55
|
| Change the Panel's theme or language, or any other setting ("改成深色", "change any setting") | `sideby config get --json`, `sideby config set <key> <value> --json` (exit 10 first) | `references/panel.md` |
|
|
56
|
+
| Change the Panel's colors or Theme ("换个主题", "面板颜色太丑", "make the Panel green", "按我公司的品牌色配一套"), check one, or go back | `sideby theme --json`, `sideby theme use <name>` / `use --undo`, `sideby theme check <file> --json`, `sideby theme preview <file>`, `sideby theme import <file>` (exit 10 when the name exists) | `references/themes.md` |
|
|
55
57
|
| Turn Auto Update on or off | `sideby update --auto on|off --json` | `references/update.md` |
|
|
56
58
|
| Switch between a local build of sideby and the release ("切换到正式版", "切回 dev 版本") | `sideby local --json`, `sideby local on|off --json` (exits 10 first) | `references/update.md` |
|
|
57
59
|
| Repair drift or permissions | `sideby doctor [ref] --json`, then `--fix` after they agree | `references/diagnose.md` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AI Tasks
|
|
2
2
|
|
|
3
|
-
An AI Task is a session of the user's own Host that sideby started for them, with a Task Prompt as its first message. The user starts it from the Panel ("Let AI do it", a Finding, a quota cell, the new-account dialog, "Other tool…", "Let AI write a plugin", "Not sure how? Let AI set it up" in the Preferred terminal dialog, "Let AI tune it" on the Auto Handoff page) or with `sideby ask` in a terminal (`--task free|fix|quota|account|host|plugin|terminal|handoff|menubar|hotkey`; "Let AI check it" in the Panel's Menu bar icon dialog starts `menubar`, and "Not sure which? Let AI pick one" under its shortcut starts `hotkey`). The prompt says what to do and gives facts sideby already knows (account refs, Family, Finding codes, the quota reason, the Panel language, the sideby version). How to do it is on this page.
|
|
3
|
+
An AI Task is a session of the user's own Host that sideby started for them, with a Task Prompt as its first message. The user starts it from the Panel ("Let AI do it", a Finding, a quota cell, the new-account dialog, "Other tool…", "Let AI write a plugin", "Not sure how? Let AI set it up" in the Preferred terminal dialog, "Let AI tune it" on the Auto Handoff page) or with `sideby ask` in a terminal (`--task free|fix|quota|account|host|plugin|terminal|handoff|theme|menubar|hotkey`; "Let AI pick my colors" in the Panel's Theme dialog starts `theme`, see `references/themes.md`; "Let AI check it" in the Panel's Menu bar icon dialog starts `menubar`, and "Not sure which? Let AI pick one" under its shortcut starts `hotkey`). The prompt says what to do and gives facts sideby already knows (account refs, Family, Finding codes, the quota reason, the Panel language, the sideby version). How to do it is on this page.
|
|
4
4
|
|
|
5
5
|
You are inside such a session when the first message came from sideby and names a task. Work in the directory the session started in (sideby's own `ai/` folder) unless the user names another one.
|
|
6
6
|
|
|
@@ -13,6 +13,15 @@ Use these commands for the same persistent settings as the Panel. Prefer account
|
|
|
13
13
|
- Same Login row name: the Panel shows two directories of one login as one row, named after the one that comes first in the order. To show `001` instead of `main`, run `sideby order claude 001` (the rest follows). `order --reset` brings back the main directory's name.
|
|
14
14
|
- Desktop app windows (Grok Bot, id `grok-bot`) are a group in the same order: `sideby order --families claude grok-bot codex` places the group, `sideby order grok-bot 001 main` orders its windows. They cannot be pinned.
|
|
15
15
|
|
|
16
|
+
## Hidden Families and Accounts
|
|
17
|
+
|
|
18
|
+
When the user says the Panel or the menu bar shows too many tools or accounts ("hide pi", "别显示 Antigravity", "把旧账号藏起来"):
|
|
19
|
+
|
|
20
|
+
- `sideby hide pi --json` hides a whole Family; `sideby hide claude:old --json` (an account or short command) hides one account with the other directories of its Same Login. `sideby unhide <same> --json` shows it again. Both return `target`, `kind` (`family` or `account`), `hidden`, `changed`, `message`, `display`, save immediately, and repeating one is a no-op. An account of a hidden Family cannot be shown alone: `unhide` says to unhide the Family.
|
|
21
|
+
- Hidden is display only: the account still starts with `sideby run`, still shows in Session History, and can still be picked by `sideby next` or Auto Handoff. To stop it taking over, change the Handoff Rules instead. Turning a plugin off (`plugins.<plugin>.enabled: false`) is different: it stops sideby loading the Family at all, so only suggest it when the user asks for that.
|
|
22
|
+
- The Panel's account list, the menu bar and the text of `sideby list` leave hidden ones out; `sideby list --all` shows them marked `(hidden)`. `sideby list --json` keeps every account and marks hidden ones `hidden: true` (Families too), so read that field before telling the user an account is missing. `sideby order --json` marks `hidden` per Family and account, and `order --reset` keeps what is hidden.
|
|
23
|
+
- In the Panel: the row's … menu has "Hide this account" and "Hide all of <tool>"; the arrange mode has an eye per group and row; the line "N hidden · Show" under the list brings them back for this page.
|
|
24
|
+
|
|
16
25
|
These affect display only, never Handoff Order. Saving removes names that no longer exist. The existing Same Login rules apply (Claude groups by email and organization; Codex also by ChatGPT workspace; Grok also by x.ai user and team).
|
|
17
26
|
|
|
18
27
|
## Model and effort
|
|
@@ -9,7 +9,7 @@ Claude quota needs a one-time change to `~/.claude/settings.json`: the status li
|
|
|
9
9
|
|
|
10
10
|
Accounts with their own (not linked) `settings.json` show quota `not-enabled` until that file's status line is wrapped the same way; tell the user instead of editing it.
|
|
11
11
|
|
|
12
|
-
After setup, each account shows quota once it has had one session with a reply. Codex quota needs no setup: sideby asks the official `codex app-server` every 15 minutes, without a conversation. `sideby quota codex --refresh --json` asks now; `sideby quota check codex off --json` disables querying, as does CI. Local session records are a fallback only until the first successful query; they cannot overwrite fetched quota afterward. On failure, relay `fetchError` and `observedAt`, never call old numbers current. The menu's checked time is separate from each row's `observedAt` and `stale`; readings older than one hour or with a query failure show as older readings. Tested with Codex CLI 0.163.0.
|
|
12
|
+
After setup, each account shows quota once it has had one session with a reply. Codex quota needs no setup: sideby asks the official `codex app-server` every 15 minutes, without a conversation. `sideby quota codex --refresh --json` asks now; `sideby quota check codex off --json` disables querying, as does CI. Local session records are a fallback only until the first successful query; they cannot overwrite fetched quota afterward. On failure, relay `fetchError` and `observedAt`, never call old numbers current. The menu's checked time is separate from each row's `observedAt` and `stale`; readings older than one hour or with a query failure show as older readings, except a reading over an hour old whose login has had no local session since (it stays current; use on the web or other computers is not seen). Claude Code quota cannot be refreshed on demand: tell the user it updates when a session runs in that account. Tested with Codex CLI 0.163.0.
|
|
13
13
|
|
|
14
14
|
Two accounts of one tool signed in as the same login (Claude: same email and organization; Codex and Grok also compare the workspace or team; `sameLogin` in `sideby list --json`) share one quota: both show the freshest reading, and `quota.from` names the account it was read from. Explain that to the user rather than calling the numbers wrong; usage stays per account, and sideby never merges or deletes either directory.
|
|
15
15
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Themes: the Panel's colors
|
|
2
|
+
|
|
3
|
+
A Theme is a named set of Panel colors, one version for light and one for dark (spec §3.34, ADR-0050). sideby has two Built-in Themes: `sky` (default: light blue) and `leaf` (light green with green quota bars, from Radix Colors). The user can pick one, give their own accent color, or keep a Theme File of their own. Light, dark or system is a separate setting (`panel.theme`).
|
|
4
|
+
|
|
5
|
+
## See and switch
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
sideby theme --json # every Theme: id, name, source (builtin|file), active, problems
|
|
9
|
+
sideby theme use leaf --json # switch; the Panel shows it on its next refresh
|
|
10
|
+
sideby theme use --undo --json # back to the Theme before the last switch
|
|
11
|
+
sideby theme use default --json # no Theme chosen: Sky, or inside a Portal the Portal's colors
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`use` changes only config `panel.colorTheme`, nothing else; it needs no `--yes`, because undo is one command. Tell the user they can also click **Settings › Theme** in the Panel.
|
|
15
|
+
|
|
16
|
+
## A Theme File
|
|
17
|
+
|
|
18
|
+
A Theme File is JSON in `~/.config/sideby/themes/<name>.json` (the folder `sideby theme --json` prints as `folder`). It holds colors only, never code:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{ "schemaVersion": 1, "name": "Calm green", "base": "leaf", "accent": "#4f9d69",
|
|
22
|
+
"light": { "bg": "#fafaf7" }, "dark": {} }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- `base`: the Built-in Theme to start from (default `sky`).
|
|
26
|
+
- `accent`: one `#rrggbb` color; sideby makes the main button, links, selection, focus and the normal quota bar from it. Neutrals and warning colors stay the base's. Usually `base` plus `accent` is enough.
|
|
27
|
+
- `light` / `dark`: single tokens to change, by the names `sideby theme export sky` prints. Unknown keys are ignored with a warning.
|
|
28
|
+
- The file name is the Theme's name: lowercase letters, digits and hyphens.
|
|
29
|
+
|
|
30
|
+
## Making one for the user ("Let AI pick my colors")
|
|
31
|
+
|
|
32
|
+
1. Run `sideby theme --json` to see the Themes and the one in use. Ask what feel they want; a screenshot, a website or a brand color is a good start. Take colors from what they give; do not guess a brand's colors from memory.
|
|
33
|
+
2. Write the file in the current folder, not in the themes folder yet. Start from `base` and `accent`; add `light` / `dark` tokens only for what still looks wrong.
|
|
34
|
+
3. Run `sideby theme check <file> --json`. Every pair needs `ok: true` (text 4.5:1, the main button and focus outline 3:1). For a failing pair, use its `suggest` value for that token, or pick another; run it again until all pass. The Panel would adjust failing colors by itself, but a Theme should not rely on that.
|
|
35
|
+
4. Run `sideby theme preview <file>`: it shows the Theme once in the running Panel without switching. If the Panel is not running, give the user `sideby ui --background` first. Ask what they think; change and preview again as often as needed.
|
|
36
|
+
5. Only when they like it: `sideby theme import <file> --json` (exit 10 when that name exists; add `--yes` only after they agree to replace it), then `sideby theme use <name> --json`. Remind them `sideby theme use --undo` goes back.
|
|
37
|
+
|
|
38
|
+
Keep warnings and errors readable: do not set `warn`, `fail`, `warnBar` or `failBar` to the accent's hue, and do not make the normal quota bar (`okBar`) red or amber.
|
|
39
|
+
|
|
40
|
+
## Other commands
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
sideby theme export sky --out my-theme.json # a full copy to edit (refuses to overwrite a file)
|
|
44
|
+
sideby theme remove <name> --yes --json # delete a Theme File; the Panel goes back to sky if it was in use
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
A Portal that embeds the Panel can set colors itself (`PanelTheme`). They show until the user picks a Theme; a picked Theme wins over them. When the user wants the Portal's colors back there, run `sideby theme use default`.
|