Skip to content

Commit 142e1cb

Browse files
committed
disabled by default
1 parent 755b3fc commit 142e1cb

6 files changed

Lines changed: 18 additions & 5 deletions

File tree

packages/opencode/specs/tui-plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Example:
5555
- Internal plugins can declare `enabled: false` to be registered but inactive by default; `plugin_enabled` and runtime KV can still enable them by id.
5656
- `plugin_enabled` is merged across config layers.
5757
- Runtime enable/disable state is also stored in KV under `plugin_enabled`; that KV state overrides config on startup.
58-
- `attention.enabled` disables all `api.attention.notify(...)` delivery when set to `false`.
58+
- `attention.enabled` defaults to `false`; when `false`, it disables all `api.attention.notify(...)` delivery.
5959
- `attention.notifications` and `attention.sound` independently control terminal-mediated desktop notifications and built-in sounds.
6060
- `attention.volume` sets the default built-in sound volume from `0` to `1`.
6161
- `attention.sound_pack` selects the initial semantic sound pack. Persisted runtime selection in KV can override it.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# TUI Notifications Default
2+
3+
Problem:
4+
5+
- v1 defaults `attention.enabled` to `false`
6+
- users can opt in with `attention.enabled = true`
7+
- v2 should make core TUI notifications a default behavior
8+
9+
## v2 Target
10+
11+
Flip `attention.enabled` to `true` by default in v2.
12+
13+
Keep `attention.enabled = false` as the explicit opt-out.

packages/opencode/src/cli/cmd/tui/config/tui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const loadState = Effect.fn("TuiConfig.loadState")(function* (ctx: { directory:
231231
const result: Resolved = {
232232
...acc.result,
233233
attention: {
234-
enabled: acc.result.attention?.enabled ?? true,
234+
enabled: acc.result.attention?.enabled ?? false,
235235
notifications: acc.result.attention?.notifications ?? true,
236236
sound: acc.result.attention?.sound ?? true,
237237
volume: acc.result.attention?.volume ?? 0.4,

packages/opencode/test/cli/run/runtime.boot.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function config(input?: {
9494
})
9595
return {
9696
attention: {
97-
enabled: true,
97+
enabled: false,
9898
notifications: true,
9999
sound: true,
100100
volume: 0.4,

packages/opencode/test/config/tui.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ test("loads tui config with the same precedence order as server config paths", a
145145
test("resolves attention config defaults and overrides", async () => {
146146
await using defaults = await tmpdir()
147147
expect((await getTuiConfig(defaults.path)).attention).toEqual({
148-
enabled: true,
148+
enabled: false,
149149
notifications: true,
150150
sound: true,
151151
volume: 0.4,

packages/opencode/test/fixture/tui-runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function createTuiResolvedConfig(input: ResolvedInput = {}): TuiConfig.Re
2424
return {
2525
...input,
2626
attention: {
27-
enabled: true,
27+
enabled: false,
2828
notifications: true,
2929
sound: true,
3030
volume: 0.4,

0 commit comments

Comments
 (0)