sideby 0.20.0 → 0.21.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/dist/build.json CHANGED
@@ -1 +1 @@
1
- {"id":"20261021T033928-239af7"}
1
+ {"id":"20261021T042712-45c7d1"}
@@ -853,6 +853,7 @@ declare const en: {
853
853
  'hist.unfold': string;
854
854
  'hist.fold': string;
855
855
  'hist.unfoldOne': string;
856
+ 'hist.catMove': string;
856
857
  'hist.day.today': string;
857
858
  'hist.day.yesterday': string;
858
859
  'hist.day.week': string;
@@ -855,6 +855,7 @@ const en = {
855
855
  'hist.unfold': 'Open {n} folded groups',
856
856
  'hist.fold': 'Fold',
857
857
  'hist.unfoldOne': 'Unfold',
858
+ 'hist.catMove': 'Click to fold; drag, or Alt+arrow keys, to move',
858
859
  'hist.day.today': 'Today',
859
860
  'hist.day.yesterday': 'Yesterday',
860
861
  'hist.day.week': 'Previous {n} days',
@@ -2150,6 +2151,7 @@ const zh = {
2150
2151
  'hist.unfold': '展开 {n} 个已折叠的组',
2151
2152
  'hist.fold': '收起',
2152
2153
  'hist.unfoldOne': '展开',
2154
+ 'hist.catMove': '点击收起或展开;拖动或按 Alt+方向键换位置',
2153
2155
  'hist.day.today': '今天',
2154
2156
  'hist.day.yesterday': '昨天',
2155
2157
  'hist.day.week': '{n} 天内',
@@ -107,6 +107,11 @@ export declare function attentionWhy(a: LogicAccount, health: {
107
107
  * order they came. Names no longer there are simply not met.
108
108
  */
109
109
  export declare function inDisplayOrder<T>(items: readonly T[], key: (t: T) => string, order?: readonly string[]): T[];
110
+ /**
111
+ * The categories of the History side list in the order the user dragged them to: the saved ones first, then the
112
+ * others in the order `seen` gives (latest Session first). The empty category (Projects without one) stays last.
113
+ */
114
+ export declare function categoryOrder(seen: readonly string[], saved: readonly string[]): string[];
110
115
  /**
111
116
  * The Display Order after a drag (spec §3.25). `all` is every key of the list in the current Display Order, hidden
112
117
  * ones included; `shown` is what the screen showed, in its order, as units (one key, or a Same Login group that moves
@@ -137,6 +137,20 @@ export function inDisplayOrder(items, key, order) {
137
137
  .sort((x, y) => x.r - y.r || x.i - y.i)
138
138
  .map((x) => x.t);
139
139
  }
140
+ /**
141
+ * The categories of the History side list in the order the user dragged them to: the saved ones first, then the
142
+ * others in the order `seen` gives (latest Session first). The empty category (Projects without one) stays last.
143
+ */
144
+ export function categoryOrder(seen, saved) {
145
+ const has = new Set(seen);
146
+ const out = [];
147
+ for (const c of [...saved, ...seen])
148
+ if (c && has.has(c) && !out.includes(c))
149
+ out.push(c);
150
+ if (has.has(''))
151
+ out.push('');
152
+ return out;
153
+ }
140
154
  /**
141
155
  * The Display Order after a drag (spec §3.25). `all` is every key of the list in the current Display Order, hidden
142
156
  * ones included; `shown` is what the screen showed, in its order, as units (one key, or a Same Login group that moves
@@ -1,7 +1,7 @@
1
1
  // The Panel page's inline script. Plain browser JavaScript in a string (no template literals inside, so String.raw
2
2
  // keeps it verbatim); the pure helpers from page-logic.ts are prepended so the tested code is the code that runs.
3
3
  import { quotaIsStale } from '../core/quota-levels.js';
4
- import { aiTaskAccounts, aliasArgsOf, aliasIssue, askBridge, askBridged, askCopy, attentionReasons, attentionWhy, autostartNote, cacheHitRate, canLeaveLocal, codeSwapOutcome, fileSize, fixPrompt, foldSkips, foldToolCalls, formatDuration, handoffChangeOf, handoffHintAccount, handoffTaskFacts, highlightParts, histFilters, historyEmpty, historyWhen, hotkeyFromKey, hotkeyPressKind, inDisplayOrder, loginClusters, loginKey, maskEmail, matchesQuery, mdBlocks, mdInline, menuPlacement, mergeDaily, mergeUsage, messageChip, messageNews, newAccountDir, nextReset, panelFixes, panelHint, panelLang, panelMigration, panelPrefs, passedWindow, pinnedIn, quotaAskable, quotaPressure, remoteControlSummary, remoteControlTodo, reorder, rowBadge, runCodeSwap, sendBlock, sendFileProblem, sendResultView, sessionAge, sessionLabelParts, shortCwd, shortSessionLabel, sortAccounts, sortSessions, steadyOrder, stripSecrets, suggestAlias, suggestName, switchFailure, tailInView, taskFindings, updatedAge, widthFollower, widthTier, windowState, withPinned, } from './page-logic.js';
4
+ import { aiTaskAccounts, aliasArgsOf, aliasIssue, askBridge, askBridged, askCopy, attentionReasons, attentionWhy, autostartNote, cacheHitRate, canLeaveLocal, categoryOrder, codeSwapOutcome, fileSize, fixPrompt, foldSkips, foldToolCalls, formatDuration, handoffChangeOf, handoffHintAccount, handoffTaskFacts, highlightParts, histFilters, historyEmpty, historyWhen, hotkeyFromKey, hotkeyPressKind, inDisplayOrder, loginClusters, loginKey, maskEmail, matchesQuery, mdBlocks, mdInline, menuPlacement, mergeDaily, mergeUsage, messageChip, messageNews, newAccountDir, nextReset, panelFixes, panelHint, panelLang, panelMigration, panelPrefs, passedWindow, pinnedIn, quotaAskable, quotaPressure, remoteControlSummary, remoteControlTodo, reorder, rowBadge, runCodeSwap, sendBlock, sendFileProblem, sendResultView, sessionAge, sessionLabelParts, shortCwd, shortSessionLabel, sortAccounts, sortSessions, steadyOrder, stripSecrets, suggestAlias, suggestName, switchFailure, tailInView, taskFindings, updatedAge, widthFollower, widthTier, windowState, withPinned, } from './page-logic.js';
5
5
  const LOGIC = [
6
6
  quotaIsStale,
7
7
  aiTaskAccounts,
@@ -19,6 +19,7 @@ const LOGIC = [
19
19
  hotkeyFromKey,
20
20
  hotkeyPressKind,
21
21
  cacheHitRate,
22
+ categoryOrder,
22
23
  fileSize,
23
24
  fixPrompt,
24
25
  foldSkips,
@@ -150,6 +151,8 @@ const MAIN = String.raw `
150
151
  const keys = raw.histFold[g] && typeof raw.histFold[g] === 'object' ? Object.keys(raw.histFold[g]).filter((k) => raw.histFold[g][k] === true).slice(0, HIST_FOLD_MAX) : []
151
152
  if (keys.length) { p.histFold[g] = {}; for (const k of keys) p.histFold[g][k] = true }
152
153
  }
154
+ // The categories of the side list, in the order the user dragged them to.
155
+ p.histCatOrder = Array.isArray(raw.histCatOrder) ? raw.histCatOrder.filter((c) => typeof c === 'string' && c).slice(0, HIST_FOLD_MAX) : []
153
156
  // The categories folded in the side list.
154
157
  p.histCatFold = {}
155
158
  if (raw.histCatFold && typeof raw.histCatFold === 'object')
@@ -3680,7 +3683,7 @@ const MAIN = String.raw `
3680
3683
  e.search = h('label', { class: 'search hist-search' }, icon('search', 'search-ic'), e.q)
3681
3684
  e.head = h('div', { class: 'section-head' })
3682
3685
  e.intro = h('p', { class: 'muted small' })
3683
- e.side = h('nav', { class: 'hist-side' })
3686
+ e.side = h('nav', { class: 'hist-side', ondragover: onCatDragOver, ondrop: onCatDrop })
3684
3687
  e.status = h('div', { class: 'hist-status' })
3685
3688
  e.list = h('div', { class: 'hist-list' })
3686
3689
  e.tail = h('div', { class: 'hist-tail' })
@@ -3791,7 +3794,7 @@ const MAIN = String.raw `
3791
3794
  if (!e || !e.root.isConnected) return
3792
3795
  const list = hs.projects
3793
3796
  const shown = list && list.map((p) => [p.project, p.name, p.sessions, p.gone, p.category])
3794
- drawIf(e.side, JSON.stringify([lang, hs.project, hs.category, shown, hs.cats, hs.projError ? hs.projError.message : '']), () => {
3797
+ drawIf(e.side, JSON.stringify([lang, hs.project, hs.category, shown, hs.cats, prefs.histCatOrder, hs.projError ? hs.projError.message : '']), () => {
3795
3798
  const total = list ? list.reduce((n, p) => n + p.sessions, 0) : 0
3796
3799
  const item = (project, name, count, gone, tip) => h('button', { class: 'hist-proj', type: 'button', 'data-key': 'hist-p-' + project, 'aria-pressed': hs.project === project && !(project === '' && hs.category) ? 'true' : 'false', title: tip || null, onclick: () => pickProject(project) },
3797
3800
  h('span', { class: 'hist-proj-name' }, name),
@@ -3802,11 +3805,12 @@ const MAIN = String.raw `
3802
3805
  const proj = (p) => item(p.project, p.name, p.sessions, p.gone, p.project + (p.gone ? ' · ' + t('hist.gone') : ''))
3803
3806
  const all = item('', t('hist.allProjects'), total)
3804
3807
  if (!hs.cats) return [h('h3', { class: 'hist-side-h' }, t('hist.projects')), h('div', { class: 'hist-projs' }, all, list.map(proj))]
3805
- // With a plugin's categories: each category heads its Projects, in the order of their latest Session; a
3806
- // category heading filters to all of its Projects. Projects without one come last.
3808
+ // With a plugin's categories: each category heads its Projects, in the order the user dragged them to, else
3809
+ // of their latest Session; a category heading folds them. Projects without one come last.
3807
3810
  const cats = new Map()
3808
3811
  for (const p of list) { const c = p.category || ''; if (!cats.has(c)) cats.set(c, []); cats.get(c).push(p) }
3809
- const order = [...cats.keys()].filter(Boolean).concat(cats.has('') ? [''] : [])
3812
+ const order = categoryOrder([...cats.keys()], prefs.histCatOrder)
3813
+ hs.catNames = order.filter(Boolean)
3810
3814
  return [h('h3', { class: 'hist-side-h' }, groupName('category')), h('div', { class: 'hist-projs' }, all,
3811
3815
  order.map((c) => {
3812
3816
  const ps = cats.get(c)
@@ -3814,20 +3818,72 @@ const MAIN = String.raw `
3814
3818
  const name = c || t('hist.noCategory')
3815
3819
  const folded = Boolean(prefs.histCatFold[c])
3816
3820
  const bodyId = 'hcat-' + order.indexOf(c)
3817
- const chev = h('button', { class: 'hist-catfold', type: 'button', 'data-key': 'hist-cf-' + c, 'aria-expanded': String(!folded), 'aria-controls': bodyId,
3818
- 'aria-label': t('group.toggle', { title: name, count: String(n), action: t(folded ? 'hist.unfoldOne' : 'hist.fold') }) }, icon('chevron', 'chev'))
3819
- const pick = c
3820
- ? h('button', { class: 'hist-proj hist-cat', type: 'button', 'data-key': 'hist-c-' + c, 'aria-pressed': hs.category === c ? 'true' : 'false', onclick: () => pickCategory(c) },
3821
- h('span', { class: 'hist-proj-name' }, c), h('span', { class: 'hist-proj-n' }, String(n)))
3822
- : h('span', { class: 'hist-cat hist-cat-none' }, h('span', { class: 'hist-proj-name' }, name), h('span', { class: 'hist-proj-n' }, String(n)))
3823
- const grp = h('div', { class: 'hist-catgrp' + (folded ? ' is-folded' : ''), role: 'group', 'aria-label': name },
3824
- h('div', { class: 'hist-cathead' }, chev, pick),
3821
+ // The whole heading folds the category, so a click anywhere on it opens or closes its Projects.
3822
+ // A named category also moves: dragged, or with Alt and the arrow keys. Projects without one stay last.
3823
+ const head = h('button', { class: 'hist-proj hist-cat', type: 'button', 'data-key': 'hist-cf-' + c, 'aria-expanded': String(!folded), 'aria-controls': bodyId,
3824
+ 'aria-label': t('group.toggle', { title: name, count: String(n), action: t(folded ? 'hist.unfoldOne' : 'hist.fold') }),
3825
+ draggable: c ? 'true' : null, title: c ? t('hist.catMove') : null,
3826
+ ondragstart: c ? (ev) => {
3827
+ hs.catDrag = { from: hs.catNames.indexOf(c), to: null }
3828
+ ev.dataTransfer.effectAllowed = 'move'
3829
+ try { ev.dataTransfer.setData('text/plain', c) } catch {}
3830
+ requestAnimationFrame(() => grp.classList.add('is-dragging'))
3831
+ } : null,
3832
+ ondragend: c ? () => endCatDrag() : null,
3833
+ onkeydown: c ? (ev) => {
3834
+ const step = { ArrowUp: -1, ArrowDown: 1 }[ev.key]
3835
+ if (!ev.altKey || !step) return
3836
+ ev.preventDefault()
3837
+ const from = hs.catNames.indexOf(c)
3838
+ moveCategory(from, Math.max(0, Math.min(hs.catNames.length - 1, from + step)), c)
3839
+ } : null },
3840
+ icon('chevron', 'chev'), h('span', { class: 'hist-proj-name' }, name), h('span', { class: 'hist-proj-n' }, String(n)))
3841
+ const grp = h('div', { class: 'hist-catgrp' + (folded ? ' is-folded' : ''), role: 'group', 'aria-label': name, 'data-cat': c },
3842
+ h('div', { class: 'hist-cathead' }, head),
3825
3843
  h('div', { class: 'hist-catbody', id: bodyId }, h('div', { class: 'hist-catps' }, ps.map(proj))))
3826
- chev.addEventListener('click', () => foldCategory(c, grp, chev, name, n))
3844
+ head.addEventListener('click', () => foldCategory(c, grp, head, name, n))
3827
3845
  return grp
3828
3846
  }))]
3829
3847
  })
3830
3848
  }
3849
+ // Dragging a category over the side list marks where it would land: before the category under the pointer, or after
3850
+ // it past its middle. Projects without a category stay last, so nothing lands after them.
3851
+ function onCatDragOver(ev) {
3852
+ const d = hs.catDrag
3853
+ const grp = d && ev.target.closest && ev.target.closest('.hist-catgrp[data-cat]')
3854
+ if (!grp) return
3855
+ ev.preventDefault()
3856
+ ev.dataTransfer.dropEffect = 'move'
3857
+ const c = grp.getAttribute('data-cat')
3858
+ const r = grp.getBoundingClientRect()
3859
+ const after = c !== '' && ev.clientY > r.top + r.height / 2
3860
+ const at = (c === '' ? hs.catNames.length : hs.catNames.indexOf(c)) + (after ? 1 : 0)
3861
+ clearDropMarks()
3862
+ grp.classList.add(after ? 'drop-after' : 'drop-before')
3863
+ // Dropped after itself means one place earlier once it is taken out.
3864
+ d.to = Math.min(hs.catNames.length - 1, at > d.from ? at - 1 : at)
3865
+ }
3866
+ function onCatDrop(ev) {
3867
+ const d = hs.catDrag
3868
+ if (!d || d.to === null) return
3869
+ ev.preventDefault()
3870
+ endCatDrag()
3871
+ moveCategory(d.from, d.to)
3872
+ }
3873
+ function endCatDrag() {
3874
+ hs.catDrag = null
3875
+ clearDropMarks()
3876
+ for (const el of document.querySelectorAll('.hist-catgrp.is-dragging')) el.classList.remove('is-dragging')
3877
+ }
3878
+ // The new order is kept in this browser, with the other preferences; the focus follows a category moved by keys.
3879
+ function moveCategory(from, to, focus) {
3880
+ if (from < 0 || from === to) return
3881
+ prefs.histCatOrder = reorder(hs.catNames, hs.catNames.map((c) => [c]), from, to).slice(0, HIST_FOLD_MAX)
3882
+ savePrefs()
3883
+ renderHistorySide()
3884
+ const el = focus && hs.els && hs.els.side.querySelector('[data-key="' + CSS.escape('hist-cf-' + focus) + '"]')
3885
+ if (el) el.focus()
3886
+ }
3831
3887
  // A category in the side list folds in place (CSS eases its height); the list is not drawn again for it.
3832
3888
  function foldCategory(c, grp, chev, name, n) {
3833
3889
  const folded = !prefs.histCatFold[c]
@@ -3847,13 +3903,6 @@ const MAIN = String.raw `
3847
3903
  renderHistorySide()
3848
3904
  historyChanged(false)
3849
3905
  }
3850
- function pickCategory(c) {
3851
- if (hs.category === c) return
3852
- hs.category = c
3853
- hs.project = ''
3854
- renderHistorySide()
3855
- historyChanged(false)
3856
- }
3857
3906
  // ---------- grouping the list ----------
3858
3907
  // A "Display" popover by the filters picks how the list is grouped; a group folds from its header and stays
3859
3908
  // folded in this browser. The server pages through the groups in order and counts folded ones without their rows.
@@ -994,19 +994,15 @@ select:is(:hover, :focus) { --chevron: var(--text); }
994
994
  .hist-gtitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
995
995
  .hist-gtoggle .spin { width: 12px; height: 12px; }
996
996
  .hist-catgrp { display: flex; flex-direction: column; margin-top: 6px; }
997
- .hist-cathead { position: relative; display: flex; align-items: center; min-width: 0; }
998
- .hist-cathead > .hist-proj, .hist-cathead > .hist-cat-none { padding-left: 24px; }
999
- .hist-catfold { position: absolute; left: 2px; top: 50%; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: -10px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--faint); cursor: pointer; transition: background-color .12s, color .12s; }
1000
- .hist-catfold:hover { background: var(--hover); color: var(--text); }
1001
- .hist-catfold:focus-visible { outline: var(--focus-outline); outline-offset: 1px; box-shadow: var(--focus-ring); }
1002
- .hist-catfold .chev { width: 12px; height: 12px; color: inherit; }
1003
- .hist-catfold[aria-expanded=true] .chev { transform: rotate(90deg); }
997
+ .hist-cathead { display: flex; align-items: center; min-width: 0; }
998
+ .hist-cathead > .hist-proj { padding-left: 6px; }
999
+ .hist-cathead .chev { flex: none; width: 12px; height: 12px; }
1000
+ .hist-cathead [aria-expanded=true] .chev { transform: rotate(90deg); }
1004
1001
  /* The rows fold by easing the grid row from its content to nothing, so nothing below jumps. */
1005
1002
  .hist-catbody { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .18s ease, opacity .18s ease; }
1006
1003
  .hist-catbody > .hist-catps { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
1007
1004
  .hist-catgrp.is-folded .hist-catbody { grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .18s ease, opacity .18s ease, visibility 0s .18s; }
1008
1005
  .hist-cat { color: var(--text); font-weight: var(--strong-weight); }
1009
- .hist-cat-none { display: flex; align-items: center; gap: 6px; width: 100%; padding: 5px 10px; font-size: var(--small); color: var(--muted); }
1010
1006
  .hist-catps .hist-proj { padding-left: 24px; }
1011
1007
  .hist-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--small); color: var(--muted); cursor: pointer; white-space: nowrap; }
1012
1008
  .hist-check input { margin: 0; accent-color: var(--accent); }
@@ -1121,12 +1117,10 @@ select:is(:hover, :focus) { --chevron: var(--text); }
1121
1117
  :where(:root[data-width=narrow], :root[data-width=phone]) .hist-projs { flex-direction: row; gap: 4px; }
1122
1118
  :where(:root[data-width=narrow], :root[data-width=phone]) .hist-proj { width: auto; flex: none; max-width: 16em; }
1123
1119
  :where(:root[data-width=narrow], :root[data-width=phone]) :is(.hist-catgrp, .hist-catps) { flex-direction: row; display: flex; gap: 4px; margin-top: 0; }
1124
- :where(:root[data-width=narrow], :root[data-width=phone]) .hist-cat-none { display: none; }
1125
1120
  :where(:root[data-width=narrow], :root[data-width=phone]) .hist-catps .hist-proj { padding-left: 10px; }
1126
- :where(:root[data-width=narrow], :root[data-width=phone]) .hist-catfold { display: none; }
1127
- :where(:root[data-width=narrow], :root[data-width=phone]) .hist-cathead > .hist-proj { padding-left: 10px; }
1128
- :where(:root[data-width=narrow], :root[data-width=phone]) :is(.hist-catbody, .hist-cathead) { display: contents; }
1129
- /* Without the arrow a folded category could not be opened again, so a narrow screen shows every category open. */
1121
+ :where(:root[data-width=narrow], :root[data-width=phone]) .hist-cathead { display: none; }
1122
+ :where(:root[data-width=narrow], :root[data-width=phone]) .hist-catbody { display: contents; }
1123
+ /* Without its heading a folded category could not be opened again, so a narrow screen shows every category open. */
1130
1124
  :where(:root[data-width=narrow], :root[data-width=phone]) .hist-catgrp.is-folded .hist-catbody { opacity: 1; visibility: visible; }
1131
1125
  :where(:root[data-width=narrow], :root[data-width=phone]) .hist-row { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
1132
1126
  :where(:root[data-width=narrow], :root[data-width=phone]) .hist-row .sess-actions { grid-column: 2; }
@@ -1161,7 +1155,7 @@ select:is(:hover, :focus) { --chevron: var(--text); }
1161
1155
  .dialog:not([open])::backdrop { opacity: 0; }
1162
1156
  @media (prefers-reduced-motion: reduce) {
1163
1157
  .sk, .spin, .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 { animation: none; }
1164
- .bar > span, .chev, .row, .sess-row, .sess-copy, .hist-row, .hist-cont, .hist-proj, .hist-catfold, .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 { transition: none; }
1158
+ .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 { transition: none; }
1165
1159
  :is(.btn, .icon-btn, .seg-btn, .set-tab, .chip-btn):active:not(:disabled), .set-link:hover .ic, .dialog:not([open]) { transform: none; }
1166
1160
  }
1167
1161
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sideby",
3
- "version": "0.20.0",
3
+ "version": "0.21.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)",
@@ -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.20.0"
5
+ version: "0.21.0"
6
6
  requires:
7
7
  bins: [sideby, node]
8
8
  cliHelp: sideby --help