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
5 changes: 5 additions & 0 deletions .changeset/remove-statusline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"opencode": patch
---

Remove the experimental global TUI statusline, its configuration, and its plugin extension API.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ The **Workers** view is a live, project-scoped console over the daemon's public

Redcode stores no separate consent, registration, or Project-control state. Drain intent and policy
remain daemon-owned, and status comes from the Project projection reached through the supported
`red-skills-redskilled acp` stdio adapter. Host-wide statusline details are not presented because the
public ACP session deliberately binds each connection to one Project.
`red-skills-redskilled acp` stdio adapter. Host-wide details are not presented because the public ACP
session deliberately binds each connection to one Project.

## Install

Expand Down
13 changes: 0 additions & 13 deletions packages/opencode/src/plugin/tui/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,18 +609,6 @@ function pluginApi(runtime: RuntimeState, plugin: PluginEntry, scope: PluginScop
},
}

const statusline: TuiPluginApi["statusline"] = {
register(contribution) {
const handle = runtime.view.registerStatusline(base, contribution)
return {
update(next) {
handle.update(next)
},
dispose: scope.track(() => handle.dispose()),
}
},
}

return {
app: api.app,
attention: createScopedAttention(api.attention, scope, load.plugin_root),
Expand All @@ -641,7 +629,6 @@ function pluginApi(runtime: RuntimeState, plugin: PluginEntry, scope: PluginScop
event,
renderer: api.renderer,
slots,
statusline,
plugins: {
list() {
return listPluginStatus(runtime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { HttpApiBuilder } from "effect/unstable/httpapi"
import { InstanceHttpApi } from "../api"
import { RedskilledApiError } from "../groups/redskilled"

const lastGood = new Map<
string,
{ payload: Redskilled.Payload; render: NonNullable<Redskilled.Status["render"]>; at: string }
>()
const lastGood = new Map<string, { payload: Redskilled.Payload; at: string }>()

export const redskilledHandlers = HttpApiBuilder.group(InstanceHttpApi, "redskilled", (handlers) =>
Effect.gen(function* () {
Expand Down Expand Up @@ -149,13 +146,7 @@ function project(snapshot: Snapshot, key: string, scope: Redskilled.Scope): Reds
registered_projects: registered ? [snapshot.state.project_label] : [],
workers,
}
const render = {
line: `${workers.length} Worker${workers.length === 1 ? "" : "s"} · ${snapshot.state.project_label}`,
degraded: true,
stale: true,
generated_at: now,
}
lastGood.set(key, { payload, render, at: now })
lastGood.set(key, { payload, at: now })
const consent: Redskilled.Consent = registered ? "accepted" : "unknown"
return {
lifecycle: "degraded",
Expand All @@ -168,7 +159,6 @@ function project(snapshot: Snapshot, key: string, scope: Redskilled.Scope): Reds
runner: "ACP",
},
payload,
render,
last_success_at: now,
}
}
Expand All @@ -180,7 +170,7 @@ function unavailable(key: string, scope: Redskilled.Scope, message: string): Red
consent: "unknown",
scope,
native: true,
...(cached ? { payload: cached.payload, render: cached.render, last_success_at: cached.at } : {}),
...(cached ? { payload: cached.payload, last_success_at: cached.at } : {}),
error: message,
}
}
Expand Down
3 changes: 0 additions & 3 deletions packages/opencode/test/fixture/tui-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,6 @@ export function createTuiPluginApi(opts: Opts = {}): HostPluginApi {
slots: {
register: () => "fixture-slot",
},
statusline: {
register: () => ({ update() {}, dispose() {} }),
},
plugins: {
list: () => [],
activate: async () => false,
Expand Down
1 change: 0 additions & 1 deletion packages/opencode/test/redskilled/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ describe("public redskilled ACP client", () => {
"../../src/server/routes/instance/httpapi/handlers/redskilled.ts",
"../../../schema/src/redskilled.ts",
"../../../tui/src/app.tsx",
"../../../tui/src/component/statusline.tsx",
"../../../tui/src/context/redskilled.tsx",
"../../../tui/src/routes/workers.tsx",
"../../../tui/src/routes/workers/history.ts",
Expand Down
34 changes: 0 additions & 34 deletions packages/plugin/src/tui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,39 +522,6 @@ export type TuiSlots = {
}
}

export type TuiStatuslineTone = "default" | "muted" | "info" | "success" | "warning" | "error"

export type TuiStatuslineImportance = "required" | "normal" | "optional"

export type TuiStatuslineSegment = {
id: string
text: string
short?: string
tone?: TuiStatuslineTone
order?: number
importance?: TuiStatuslineImportance
}

export type TuiStatuslineRow = {
id: string
segments: ReadonlyArray<TuiStatuslineSegment>
order?: number
}

export type TuiStatuslineContribution = {
segments?: ReadonlyArray<TuiStatuslineSegment>
rows?: ReadonlyArray<TuiStatuslineRow>
}

export type TuiStatuslineHandle = {
update: (contribution: TuiStatuslineContribution) => void
dispose: () => void
}

export type TuiStatuslineApi = {
register: (contribution: TuiStatuslineContribution) => TuiStatuslineHandle
}

export type TuiEventBus = {
on: <Type extends Event["type"]>(type: Type, handler: (event: Extract<Event, { type: Type }>) => void) => () => void
}
Expand Down Expand Up @@ -654,7 +621,6 @@ export type TuiPluginApi = {
event: TuiEventBus
renderer: CliRenderer
slots: TuiSlots
statusline: TuiStatuslineApi
plugins: {
list: () => ReadonlyArray<TuiPluginStatus>
activate: (id: string) => Promise<boolean>
Expand Down
6 changes: 0 additions & 6 deletions packages/schema/src/redskilled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,6 @@ export const Status = Schema.Struct({
native: Schema.Literal(true),
activation: Activation.pipe(optional),
payload: Payload.pipe(optional),
render: Schema.Struct({
line: Schema.String,
degraded: Schema.Boolean,
stale: Schema.Boolean,
generated_at: Schema.String,
}).pipe(optional),
last_success_at: Schema.String.pipe(optional),
error: Schema.String.pipe(optional),
})
Expand Down
44 changes: 1 addition & 43 deletions packages/sdk/js/src/v2/gen/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1976,7 +1976,7 @@ export type Config = {
}
}
/**
* Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides.
* Configure LSP servers. Omit or set to true to enable built-ins, set to false to disable, or use an object for overrides.
*/
lsp?:
| boolean
Expand Down Expand Up @@ -11348,12 +11348,6 @@ export type RedskilledStatusResponses = {
}
}>
}
render?: {
line: string
degraded: boolean
stale: boolean
generated_at: string
}
last_success_at?: string
error?: string
}
Expand Down Expand Up @@ -11479,12 +11473,6 @@ export type RedskilledConsentResponses = {
}
}>
}
render?: {
line: string
degraded: boolean
stale: boolean
generated_at: string
}
last_success_at?: string
error?: string
}
Expand Down Expand Up @@ -11610,12 +11598,6 @@ export type RedskilledProjectResizeResponses = {
}
}>
}
render?: {
line: string
degraded: boolean
stale: boolean
generated_at: string
}
last_success_at?: string
error?: string
}
Expand Down Expand Up @@ -11739,12 +11721,6 @@ export type RedskilledProjectStopResponses = {
}
}>
}
render?: {
line: string
degraded: boolean
stale: boolean
generated_at: string
}
last_success_at?: string
error?: string
}
Expand Down Expand Up @@ -11870,12 +11846,6 @@ export type RedskilledWorkerStopResponses = {
}
}>
}
render?: {
line: string
degraded: boolean
stale: boolean
generated_at: string
}
last_success_at?: string
error?: string
}
Expand Down Expand Up @@ -12001,12 +11971,6 @@ export type RedskilledWorkerRecycleResponses = {
}
}>
}
render?: {
line: string
degraded: boolean
stale: boolean
generated_at: string
}
last_success_at?: string
error?: string
}
Expand Down Expand Up @@ -12133,12 +12097,6 @@ export type RedskilledWorkerSteerResponses = {
}
}>
}
render?: {
line: string
degraded: boolean
stale: boolean
generated_at: string
}
last_success_at?: string
error?: string
}
Expand Down
4 changes: 0 additions & 4 deletions packages/tui/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ import { TuiConfigProvider, useTuiConfig, type TuiConfig } from "./config"
import { createTuiApiAdapters } from "./plugin/adapters"
import { createTuiApi } from "./plugin/api"
import { createPluginRuntime, PluginRuntimeProvider, usePluginRuntime, type TuiPluginHost } from "./plugin/runtime"
import { Statusline } from "./component/statusline"
import { RedskilledProvider, useRedskilled } from "./context/redskilled"
import { Workers } from "./routes/workers"
import { CommandPaletteDialog } from "./component/command-palette"
Expand Down Expand Up @@ -1188,9 +1187,6 @@ function App(props: { onSnapshot?: () => Promise<string[]>; pluginHost: TuiPlugi
{plugin()}
</box>
</Show>
<Show when={tuiConfig.statusline.enabled}>
<Statusline version={InstallationVersion} />
</Show>
<box flexShrink={0}>
<pluginRuntime.Slot name="app_bottom" />
</box>
Expand Down
Loading
Loading