@xtruder/opencode-claude-max-plugin 0.2.2 → 0.2.4

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": "@xtruder/opencode-claude-max-plugin",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "OpenCode plugin for Claude Max/Pro subscription via @anthropic-ai/sdk - uses Claude Code OAuth credentials",
5
5
  "keywords": [
6
6
  "ai-sdk",
@@ -56,6 +56,7 @@
56
56
  "@ai-sdk/provider": "3.0.8",
57
57
  "@ai-sdk/provider-utils": "3.0.2",
58
58
  "@opencode-ai/plugin": "^1.3.0",
59
+ "@opentui/solid": "^0.1.96",
59
60
  "ai": "5.0.124",
60
61
  "bun-types": "^1.3.11",
61
62
  "oxfmt": "^0.41.0",
@@ -1,5 +1,5 @@
1
- import { existsSync, readFileSync } from "node:fs"
2
1
  import { execSync } from "node:child_process"
2
+ import { existsSync, readFileSync } from "node:fs"
3
3
  import { homedir } from "node:os"
4
4
  import { join } from "node:path"
5
5
 
package/src/tui.tsx CHANGED
@@ -1,12 +1,11 @@
1
- // @ts-nocheck
2
1
  /** @jsxImportSource @opentui/solid */
3
- import { Show, createMemo, createSignal } from "solid-js"
4
2
  import type {
5
3
  TuiPlugin,
6
4
  TuiPluginApi,
7
5
  TuiPluginModule,
8
6
  TuiThemeCurrent,
9
7
  } from "@opencode-ai/plugin/tui"
8
+ import { type Accessor, Show, createMemo, createSignal } from "solid-js"
10
9
  import {
11
10
  type UsageData,
12
11
  bestUsageFromCache,
@@ -194,7 +193,7 @@ function UsageSidebar(props: {
194
193
  <b>Claude Usage</b>
195
194
  </text>
196
195
  <Show when={fiveHour()}>
197
- {(data) => {
196
+ {(data: Accessor<{ ratio: number; reset: string | null }>) => {
198
197
  const label = "5H "
199
198
  const suffix = createMemo(() => ` ${pct(data().ratio)}`)
200
199
  return (
@@ -214,7 +213,7 @@ function UsageSidebar(props: {
214
213
  }}
215
214
  </Show>
216
215
  <Show when={sevenDay()}>
217
- {(data) => {
216
+ {(data: Accessor<{ ratio: number; reset: string | null }>) => {
218
217
  const label = "7D "
219
218
  const suffix = createMemo(() => ` ${pct(data().ratio)}`)
220
219
  return (
@@ -330,7 +329,7 @@ function UsageDialog(props: {
330
329
  ))
331
330
  })()}
332
331
  <Show when={extra()}>
333
- {(ex) => (
332
+ {(ex: Accessor<{ enabled: boolean; text: string }>) => (
334
333
  <box paddingTop={1}>
335
334
  <text fg={ex().enabled ? theme().warning : theme().textMuted}>{ex().text}</text>
336
335
  </box>