@cortexkit/opencode-anthropic-auth 2.1.1 → 2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/opencode-anthropic-auth",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -77,18 +77,18 @@
77
77
  },
78
78
  "dependencies": {
79
79
  "@clack/prompts": "^1.6.0",
80
- "@cortexkit/anthropic-auth-core": "2.1.1",
80
+ "@cortexkit/anthropic-auth-core": "2.2.0",
81
81
  "@cortexkit/claustrum-client": "0.12.0",
82
82
  "@cortexkit/private-files": "0.2.1",
83
83
  "@cortexkit/subc-client": "^0.22.0",
84
- "@opentui/core": "0.6.5",
85
- "@opentui/solid": "0.6.5",
84
+ "@opentui/core": "0.6.6",
85
+ "@opentui/solid": "0.6.6",
86
86
  "jsonc-parser": "^3.3.1",
87
87
  "solid-js": "1.9.12",
88
88
  "xxhash-wasm": "^1.1.0"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@ai-sdk/anthropic": "4.0.77",
92
- "@opencode/plugin": "2.0.22"
92
+ "@opencode/plugin": "2.0.32"
93
93
  }
94
94
  }
@@ -888,7 +888,10 @@ export function formatPrimeCost(value: number): string {
888
888
  return value.toFixed(Math.min(6, Math.max(0, 4)))
889
889
  }
890
890
 
891
- export function formatPrimeAccountValue(account: PrimeSidebarAccountState): {
891
+ export function formatPrimeAccountValue(
892
+ account: PrimeSidebarAccountState,
893
+ now = Date.now(),
894
+ ): {
892
895
  text: string
893
896
  hasError: boolean
894
897
  } {
@@ -898,7 +901,7 @@ export function formatPrimeAccountValue(account: PrimeSidebarAccountState): {
898
901
  if (account.lastResult === 'skipped') {
899
902
  return { text: 'skip', hasError: false }
900
903
  }
901
- if (account.nextDueAt && account.nextDueAt > Date.now()) {
904
+ if (account.nextDueAt && account.nextDueAt > now) {
902
905
  return { text: formatPrimeTime(account.nextDueAt), hasError: false }
903
906
  }
904
907
  if (account.lastPrimedAt) {
@@ -994,7 +997,9 @@ export function getCollapsedAccounts(
994
997
  state: SidebarState,
995
998
  showFallbacks = true,
996
999
  ) {
997
- const activeId = resolveActiveAccount(state).id
1000
+ // Before any request no account is active; do not mark main as serving.
1001
+ const activeId =
1002
+ state.activeId === undefined ? undefined : resolveActiveAccount(state).id
998
1003
  return [
999
1004
  {
1000
1005
  id: 'main',