Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions src/plugins/tui/dist/tui.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/plugins/tui/dist/tui.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/plugins/tui/src/pantheon-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ function resolveRunningVersion(): string {

// ── The window view (presentational; both surfaces render it) ──────────

const NAME_WIDTH = 26
const VALUE_WIDTH = 24
const NAME_WIDTH = 24
const VALUE_WIDTH = 30

export function SettingsWindow(props: {
version: string
Expand Down
37 changes: 18 additions & 19 deletions src/plugins/tui/src/update-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function buildUpdatesTab(input: UpdatesSectionInput): SettingsTab {
: 'checking…'
: lastCheckMs
? isPt
? `última verificação ${formatAgo(nowMs - lastCheckMs, true)}`
? `verificado ${formatAgo(nowMs - lastCheckMs, true)}`
: `last check ${formatAgo(nowMs - lastCheckMs, false)}`
: isPt
? 'nunca verificado'
Expand All @@ -103,10 +103,8 @@ export function buildUpdatesTab(input: UpdatesSectionInput): SettingsTab {
},
]

const pluginCommand =
channel === 'beta'
? 'opencode plugin add pantheon-opencode@beta'
: 'opencode plugin add pantheon-opencode'
const pkgSpec = channel === 'beta' ? 'pantheon-opencode@beta' : 'pantheon-opencode'
const pluginCommand = `opencode plugin update ${pkgSpec}`

if (latest) {
rows.push({
Expand All @@ -117,10 +115,11 @@ export function buildUpdatesTab(input: UpdatesSectionInput): SettingsTab {
: isPt
? 'atualizado'
: 'up to date',
...(newer ? { action: 'update-run' as const } : {}),
note: newer
? isPt
? `atualize via \`${pluginCommand}\``
: `update via \`${pluginCommand}\``
? `enter atualiza agora · ou rode \`${pluginCommand}\``
: `enter updates now · or run \`${pluginCommand}\``
: isPt
? 'nenhuma versão mais recente compatível'
: 'no newer compatible version',
Expand All @@ -133,28 +132,28 @@ export function buildUpdatesTab(input: UpdatesSectionInput): SettingsTab {
? 'atualizando…'
: 'updating…'
: newer
? `${isPt ? 'instalar' : 'install'} v${latest}`
? `${isPt ? 'atualizar' : 'update'} v${latest}`
: isPt
? 'reinstalar / atualizar'
: 'reinstall / refresh',
? 'reinstalar plugin'
: 'refresh plugin',
action: 'update-run',
note: newer
? isPt
? `enter executa \`${pluginCommand}\``
: `enter runs \`${pluginCommand}\``
? `enter executa \`${pluginCommand}\` + reload`
: `enter runs \`${pluginCommand}\` + reload`
: isPt
? 'enter atualiza o plugin instalado'
? 'enter força atualização do plugin instalado'
: 'enter refreshes the installed plugin',
})
}

rows.push({
id: 'update.command',
name: isPt ? 'Comando Nativo' : 'Plugin Command',
value: pluginCommand,
name: isPt ? 'Comando no terminal' : 'CLI Command',
value: 'opencode plugin update',
note: isPt
? 'instalação nativa sem npx · funciona global ou no projeto'
: 'native plugin install (no npx) · works global or per-project',
? `sem npx: \`${pluginCommand} && opencode reload\``
: `native CLI (no npx): \`${pluginCommand} && opencode reload\``,
})

const audit = input.legacyAudit
Expand Down Expand Up @@ -195,8 +194,8 @@ export function buildUpdatesTab(input: UpdatesSectionInput): SettingsTab {
? 'escaneando…'
: 'scanning…'
: isPt
? 'verificar global + projeto'
: 'check global + project',
? 'escanear agora'
: 'scan global + project',
action: 'legacy-scan',
note: isPt
? 'enter escaneia sem modificar ou apagar nenhum arquivo'
Expand Down
3 changes: 2 additions & 1 deletion tests/tui-settings-sections.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ describe('updates section rows', () => {
})
const latest = section.groups.flatMap((g) => g.rows).find((row) => row.id === 'update.latest')
assert.equal(latest.value, 'v2.0.0-beta.3 available')
assert.match(latest.note, /opencode plugin add pantheon-opencode/)
assert.equal(latest.action, 'update-run')
assert.match(latest.note, /opencode plugin update pantheon-opencode/)
const legacyRows = section.groups
.flatMap((g) => g.rows)
.filter((row) => row.id.startsWith('legacy.'))
Expand Down
Loading