sideby 0.9.0 → 0.9.1

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":"20261015T030631-4ed31c"}
1
+ {"id":"20261015T091733-83e791"}
@@ -6,12 +6,14 @@ import { editConfigAccounts } from './config.js';
6
6
  import { UserError } from './errors.js';
7
7
  import { lineDiff } from './handoff-status.js';
8
8
  function pick(key, sideby, host, last) {
9
+ // What the Account really ran last beats the Host's default: subscription Accounts often share one settings.json,
10
+ // so its value would show the same for all of them.
9
11
  if (sideby[key])
10
12
  return { value: sideby[key], from: 'sideby' };
11
- if (host[key])
12
- return { value: host[key], from: 'host' };
13
13
  if (last[key])
14
14
  return { value: last[key], from: 'last' };
15
+ if (host[key])
16
+ return { value: host[key], from: 'host' };
15
17
  return undefined;
16
18
  }
17
19
  /** `last` is the model and effort of the newest session, from the usage reader when the caller already has it. */
@@ -256,6 +256,7 @@ declare const en: {
256
256
  'md.from.sideby': string;
257
257
  'md.from.host': string;
258
258
  'md.from.last': string;
259
+ 'md.newDefault': string;
259
260
  'md.none': string;
260
261
  'md.click': string;
261
262
  'md.envNote': string;
@@ -258,6 +258,7 @@ const en = {
258
258
  'md.from.sideby': 'set by sideby for this account',
259
259
  'md.from.host': 'from {host}’s settings',
260
260
  'md.from.last': 'used in the last session',
261
+ 'md.newDefault': 'new sessions start with {value} ({from})',
261
262
  'md.none': 'not known yet',
262
263
  'md.click': 'Click to change.',
263
264
  'md.envNote': 'ANTHROPIC_MODEL or CLAUDE_CODE_EFFORT_LEVEL in your shell, and settings from your organization, override this; sideby cannot see them.',
@@ -720,6 +721,7 @@ const zh = {
720
721
  'md.from.sideby': 'sideby 为这个账号设置',
721
722
  'md.from.host': '来自 {host} 的设置',
722
723
  'md.from.last': '最近一次会话用的',
724
+ 'md.newDefault': '新会话默认是 {value}({from})',
723
725
  'md.none': '暂时不知道',
724
726
  'md.click': '点击修改。',
725
727
  'md.envNote': 'shell 里的 ANTHROPIC_MODEL、CLAUDE_CODE_EFFORT_LEVEL 和组织下发的设置会覆盖这里,sideby 看不到它们。',
@@ -2079,10 +2079,21 @@ const MAIN = String.raw `
2079
2079
  function modelChip(a) {
2080
2080
  const mi = a.modelInfo
2081
2081
  if (!mi || (!mi.model && !mi.effort)) return null
2082
- const text = [mi.model && mi.model.value, mi.effort && mi.effort.value].filter(Boolean).join(' · ')
2082
+ // The row has little room; the hover text keeps the full model id.
2083
+ const text = [mi.model && mi.model.value.replace(/^claude-/, ''), mi.effort && mi.effort.value].filter(Boolean).join(' · ')
2084
+ // A value from the last session may differ from what a new session starts with; say both.
2085
+ const line = (label, v, key) => {
2086
+ if (!v) return null
2087
+ const out = label + ': ' + v.value + ' (' + modelFrom(a, v.from) + ')'
2088
+ const host = mi.host && mi.host[key]
2089
+ // 'opus' and 'claude-opus-5-5' name the same model: only a real difference is worth a line.
2090
+ return v.from === 'last' && host && !v.value.includes(host)
2091
+ ? out + '; ' + t('md.newDefault', { value: host, from: modelFrom(a, 'host') })
2092
+ : out
2093
+ }
2083
2094
  const title = [
2084
- mi.model ? t('md.model') + ': ' + mi.model.value + ' (' + modelFrom(a, mi.model.from) + ')' : null,
2085
- mi.effort ? t('md.effort') + ': ' + mi.effort.value + ' (' + modelFrom(a, mi.effort.from) + ')' : null,
2095
+ line(t('md.model'), mi.model, 'model'),
2096
+ line(t('md.effort'), mi.effort, 'effort'),
2086
2097
  mi.settable ? t('md.click') : null,
2087
2098
  ].filter(Boolean).join('\n')
2088
2099
  if (!mi.settable) return h('span', { class: 'mono', title }, text)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sideby",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
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", "加上账号标识"), seeing accounts, quota and usage, moving on when one hits its 5-hour or weekly limit, adding a short command (alias), 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.
4
4
  metadata:
5
- version: "0.9.0"
5
+ version: "0.9.1"
6
6
  requires:
7
7
  bins: [sideby, node]
8
8
  cliHelp: sideby --help