sideby 0.26.0 → 0.27.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.
@@ -1294,6 +1294,33 @@ select:is(:hover, :focus) { --chevron: var(--text); }
1294
1294
  .hide-btn .ic { width: 16px; height: 16px; }
1295
1295
  .hide-btn.is-on { color: var(--muted); }
1296
1296
  .hide-btn:disabled { opacity: .4; cursor: not-allowed; }
1297
+
1298
+ /* Command Palette (spec §3.36): a search box over one list; the dialog keeps its top edge while the list changes. */
1299
+ .kbd-inline { font: 11px/16px var(--mono); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; margin-left: 2px; }
1300
+ .dialog.dialog-pal { width: min(620px, calc(100vw - 24px)); flex-direction: column; }
1301
+ .pal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
1302
+ .pal-ic { flex: none; color: var(--muted); }
1303
+ .dialog .pal-input, .dialog .pal-input:focus, .dialog .pal-input:focus-visible { flex: 1; min-width: 0; height: 32px; padding: 0; border: 0; box-shadow: none; outline: none; background: none; color: var(--text); font: inherit; font-size: var(--large); outline: none; }
1304
+ .pal-input::-webkit-search-cancel-button { display: none; }
1305
+ .pal-list { overflow-y: auto; overscroll-behavior: contain; padding: 6px; display: flex; flex-direction: column; gap: 1px; max-height: min(56vh, 460px); }
1306
+ .pal-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; color: var(--muted); }
1307
+ .pal-opt { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 5px 10px; border-radius: calc(var(--ctl-radius) - 2px); color: var(--text); cursor: pointer; transition: background-color .12s ease; }
1308
+ .pal-opt[aria-selected=true] { background: var(--hover); }
1309
+ .pal-opt[aria-disabled=true] { color: var(--faint); cursor: not-allowed; }
1310
+ .pal-kind { flex: none; min-width: 52px; font-size: 11px; line-height: 18px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; text-align: center; }
1311
+ .pal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
1312
+ .pal-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1313
+ .pal-also { font-size: 11px; color: var(--muted); }
1314
+ .pal-where { flex: none; max-width: 42%; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1315
+ .pal-opt mark { background: var(--accent-soft); color: inherit; border-radius: 2px; padding: 0 1px; }
1316
+ .pal-more .pal-main, .pal-hist .pal-title, .pal-ai .pal-title { color: var(--accent); }
1317
+ .pal-hist { margin-top: 4px; }
1318
+ .pal-none { padding: 14px 10px 4px; margin: 0; }
1319
+ .pal-foot { padding: 8px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
1320
+ [data-width=narrow] .pal-where, [data-width=narrow] .pal-foot { display: none; }
1321
+ .find-flash { animation: find-flash 1.2s ease-out; border-radius: var(--ctl-radius); }
1322
+ @keyframes find-flash { 0%, 35% { box-shadow: 0 0 0 6px var(--accent-soft); background: var(--accent-soft); } to { box-shadow: 0 0 0 6px transparent; background: transparent; } }
1323
+ @media (prefers-reduced-motion: reduce) { .find-flash { animation: none; } .pal-opt { transition: none; } }
1297
1324
  @media (prefers-reduced-motion: reduce) {
1298
1325
  .sk, .spin, .hidden-bar, .is-spinning svg, .toast, .toast.bump, .toast.toast-out, .view-in > *, .set-pane.view-in, .row.flash, .sess-row.flash, .sess-msg, .seg-badge, .card.flash, .pulse, .sess-busy .sess-dot, .menu, .menu.float-out, .dialog[open], .dialog[open]::backdrop, .enter, .fade-in, .hist-list.swap-in, .tip-body, .tip-float, .row-run.is-done .ic, .tab[aria-selected=true]::after { animation: none; }
1299
1326
  .bar > span, .chev, .row, .sess-row, .sess-copy, .hist-row, .hist-cont, .hist-proj, .hist-catbody, .hist-opt, .hist-list, .icon-btn, .seg-btn, .menu-item, .set-tab, .link-btn, .tag-btn, .email-btn, .btn, .chip-btn, .set-link .ic, .dialog, .dialog[open], .dialog::backdrop, .tab, .tab::before, .tab .ic, .hp-status { transition: none; }
@@ -5,6 +5,7 @@ import { createHash } from 'node:crypto';
5
5
  import { FAVICON_SVG, MARK_SVG } from '../core/brand-mark.js';
6
6
  import { ALIAS_NAME, RESERVED_ALIASES } from '../core/config.js';
7
7
  import { QUOTA_FAIL_PERCENT, QUOTA_WARN_PERCENT, USAGE_DAYS } from '../core/quota-levels.js';
8
+ import { COMMON_ENTRIES, SEARCH_CATALOG } from '../core/search-catalog.js';
8
9
  import { REPO_URL, SKILL_INSTALL } from '../core/skill-check.js';
9
10
  import { MESSAGES } from './i18n.js';
10
11
  import { widthTier } from './page-logic.js';
@@ -90,6 +91,7 @@ export function renderPage(opts) {
90
91
  </div>
91
92
  <div class="top-actions">
92
93
  <button id="update" class="btn update-btn" type="button" hidden></button>
94
+ <button id="search-btn" class="btn" type="button" aria-haspopup="dialog" aria-label="Search"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM20 20l-4.2-4.2"/></svg><span class="hide-sm" data-i18n="pal.button">Search</span><kbd id="search-kbd" class="kbd-inline hide-sm" aria-hidden="true"></kbd></button>
93
95
  <button id="ask-ai" class="btn" type="button" aria-haspopup="dialog" aria-label="Let AI do it"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM12 5v4M9.5 13.5v1M14.5 13.5v1"/></svg><span class="hide-sm" data-i18n="ask.button">Let AI do it</span></button>
94
96
  <a id="repo" class="icon-btn repo-link" target="_blank" rel="noopener noreferrer" aria-label="sideby on GitHub" title="sideby on GitHub" hidden><svg viewBox="0 0 24 24" aria-hidden="true"><path d="${GITHUB_MARK}"/></svg></a>
95
97
  <button id="settings" class="btn" type="button" aria-haspopup="dialog" aria-expanded="false"${lang === 'auto' ? '' : ' hidden'}><span data-i18n="set.button">Settings</span></button>
@@ -118,6 +120,7 @@ export function renderPage(opts) {
118
120
  <div id="conn" class="conn" role="status" hidden></div>
119
121
  <div id="toasts" class="toasts" aria-live="polite" popover="manual"></div>
120
122
  <script type="application/json" id="sideby-boot">${boot}</script>
123
+ <script type="application/json" id="sideby-catalog">${jsonForScript({ entries: SEARCH_CATALOG, common: COMMON_ENTRIES })}</script>
121
124
  <script type="application/json" id="sideby-i18n">${jsonForScript(MESSAGES)}</script>
122
125
  <script${nonce}>${PAGE_SCRIPT}</script>
123
126
  </body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sideby",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Run work, personal and API-key accounts at the same time, without their configs drifting apart.",
5
5
  "license": "MIT",
6
6
  "author": "Adonis0123 (https://github.com/Adonis0123)",
@@ -0,0 +1,117 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/commands.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "results"
8
+ ],
9
+ "properties": {
10
+ "schemaVersion": {
11
+ "type": "number",
12
+ "const": 1
13
+ },
14
+ "results": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "required": [
19
+ "id",
20
+ "kind",
21
+ "title",
22
+ "panel",
23
+ "cliCommand"
24
+ ],
25
+ "properties": {
26
+ "id": {
27
+ "type": "string"
28
+ },
29
+ "kind": {
30
+ "type": "string",
31
+ "description": "'page', 'setting' or 'action'; an open set, so tolerate others."
32
+ },
33
+ "title": {
34
+ "type": "string"
35
+ },
36
+ "panel": {
37
+ "type": "string",
38
+ "description": "Where it lives in the Panel, such as \"Settings → General → Language\"."
39
+ },
40
+ "cliCommand": {
41
+ "anyOf": [
42
+ {
43
+ "type": "string"
44
+ },
45
+ {
46
+ "type": "null"
47
+ }
48
+ ]
49
+ }
50
+ }
51
+ }
52
+ },
53
+ "_notice": {
54
+ "type": "object",
55
+ "properties": {
56
+ "update": {
57
+ "type": "object",
58
+ "required": [
59
+ "current",
60
+ "latest",
61
+ "command",
62
+ "message"
63
+ ],
64
+ "properties": {
65
+ "current": {
66
+ "type": "string"
67
+ },
68
+ "latest": {
69
+ "type": "string"
70
+ },
71
+ "command": {
72
+ "type": "string",
73
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
74
+ },
75
+ "message": {
76
+ "type": "string"
77
+ }
78
+ }
79
+ },
80
+ "skill": {
81
+ "type": "object",
82
+ "required": [
83
+ "installed",
84
+ "current",
85
+ "command",
86
+ "message"
87
+ ],
88
+ "properties": {
89
+ "installed": {
90
+ "anyOf": [
91
+ {
92
+ "type": "string"
93
+ },
94
+ {
95
+ "type": "null"
96
+ }
97
+ ],
98
+ "description": "The skill's version; null when it has none."
99
+ },
100
+ "current": {
101
+ "type": "string"
102
+ },
103
+ "command": {
104
+ "type": "string",
105
+ "description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
106
+ },
107
+ "message": {
108
+ "type": "string"
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
114
+ }
115
+ },
116
+ "title": "sideby commands --json"
117
+ }
@@ -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.26.0"
5
+ version: "0.27.0"
6
6
  requires:
7
7
  bins: [sideby, node]
8
8
  cliHelp: sideby --help
@@ -41,6 +41,7 @@ Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique
41
41
  | Install sideby, or set up a new account ("add cc008") | `sideby --version`, `sideby list --json`, `sideby new <family> --next --json` | `references/setup.md` |
42
42
  | Show which account a session is (`[cc001]` in the status line or tab title) | `sideby list --json` for the labels | `references/badge.md` |
43
43
  | Find which session an account is running now ("cc002 现在在干嘛", "which session is cc002 running", "哪个会话在等我"), or copy one for another AI ("复制 cc002 的会话 id", "copy cc002's session for another AI", "把这个会话交给另一个 AI"); which Run (dispatched task) a session works for ("cc002 在哪个任务里", "which run is cc002 working on", "打开它的任务看板") | `sideby sessions [<account>\|<family>] --json`, `sideby sessions copy <account\|id> [--as reference\|id\|resume] --json`, `sideby sessions open-run <account\|id> --json` | `references/sessions.md` |
44
+ | Find where a setting, page or feature of sideby lives ("语言在哪改", "where is the dark mode setting", "远程控制在哪关") — not sessions: for those use `sideby history` | `sideby commands <words> --json` (English or Chinese words), then do it with the `cliCommand` it returns or tell the user the `panel` place | `references/panel.md` |
44
45
  | Find a session from before, in any account ("find a session I had before", "找一下我上周改登录页的那个会话", "sideby 项目最近的会话", "按日期分组看看"), read it, or continue it where it was | `sideby history [<words>...] [--project <name>] [--since today\|7d\|30d] [--group project\|day\|category] --json`, `sideby history show <id> --json`, `sideby history projects --json`; `--tools` also searches tool output | `references/sessions.md` |
45
46
  | Tell another running session something, or send it a screenshot ("告诉 cc002 ……", "把这张截图发给 cc003", "send this to the codex session", "tell cc002 the tests pass"); see what was sent and whether it was read ("cc002 看到我的消息了吗"); let Claude sessions show such messages at once instead of waiting for approval ("消息老要我批准", "让 cc002 直接收消息") | `sideby send <account\|session> "<text>" [--image <path>]... --json`, `sideby messages [--to <account\|session>] --json`, `sideby messages inbound --json`, then `sideby messages inbound accept` (exits 10 with the change; rerun with `--yes` after they agree) | `references/sessions.md` |
46
47
  | See every session from inside Claude Code ("在这里看所有会话", "show my sessions in Claude Code"), or turn off the label line and `/sessions` pane sideby adds to Claude Code ("关掉 sideby 的横带", "turn off the sideby mod") | tell the user to type `/sessions`; `sideby config set claudeMod false --json` (or `true`) | `references/sessions.md` |
@@ -2,6 +2,16 @@
2
2
 
3
3
  Use these commands for the same persistent settings as the Panel. Prefer account refs from `sideby list --json`; commands taking an account also accept its short command. Every JSON response has `schemaVersion: 1`.
4
4
 
5
+ ## Find where something is
6
+
7
+ When the user asks where a setting or feature is ("语言在哪改", "where do I turn off Remote Control"), run
8
+ `sideby commands <words> --json`. It searches the same list as the Panel's Search (Cmd/Ctrl+K), in English or Chinese,
9
+ and returns `{ results: [{ id, kind, title, panel, cliCommand }] }`, best match first. `kind` is `page`, `setting` or
10
+ `action` (tolerate others). Offer to do it with `cliCommand` (keep its preview step; never add `--yes` before the user
11
+ agrees), or tell the user the `panel` place, such as `Settings → General → Language`. An empty `results` exits 0:
12
+ try other words. It finds features only; to find a past session use `sideby history <words> --json`
13
+ (`references/sessions.md`).
14
+
5
15
  ## Pinned Accounts and Display Order
6
16
 
7
17
  - `sideby order --json` returns `display` (saved `families`, `accounts`, `pinned`) and `families` in their effective order. Each family has `accounts` with `name`, `ref`, `pinned`; a family with no accounts has an empty array.