Visitar URL original
feat(tui): default transcript verbosity to low by jlongster · Pull Request #63207 · anomalyco/opencode · GitHub
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
2 changes: 1 addition & 1 deletion packages/tui/src/component/dialog-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const settings: Setting[] = [
category: "Session",
path: ["session", "verbosity"],
description: "How much tool activity is shown in the chat",
default: "medium",
default: "low",
values: ["low", "medium", "high"],
keywords: ["detail", "activity", "summary", "transcript"],
},
Expand Down
2 changes: 1 addition & 1 deletion packages/tui/src/routes/session/grouping/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type SessionGroup = {

/** Experimental transcript detail; undefined selects the default production rules. */
export type Verbosity = "low" | "medium" | "high"
export const defaultVerbosity: Verbosity = "medium"
export const defaultVerbosity: Verbosity = "low"

export type SessionRow = SessionEntry | SessionGroup

Expand Down
2 changes: 1 addition & 1 deletion packages/tui/test/cli/tui/data.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function emitEvent(events: ReturnType<typeof createEventStream>, event: OpenCode
events.emit({ ...event, location: { directory } })
}

const config = createTuiResolvedConfig()
const config = createTuiResolvedConfig({ session: { verbosity: "medium" } })

function DataProvider(props: ParentProps) {
return (
Expand Down
4 changes: 2 additions & 2 deletions packages/tui/test/cli/tui/session-grouping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ test("a pending tool does not hide a later tool reusing its call ID in another m
const rows: SessionRow[] = []
const blocked = { messageID: "assistant-a", partID: "call-reused" }
const later = { messageID: "assistant-b", partID: "call-reused" }
append(rows, blocked, { type: "tool", name: "read" })
append(rows, blocked, { type: "tool", name: "read" }, rows.length, "medium")
partitionPending(rows, new Set([blocked.partID]))
append(rows, later, { type: "tool", name: "read" })
append(rows, later, { type: "tool", name: "read" }, rows.length, "medium")

const group = rows[0]
if (group.type !== "group" || group.kind !== "exploration") throw new Error("Expected exploration group")
Expand Down
5 changes: 4 additions & 1 deletion packages/tui/test/cli/tui/session-rows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ import { SessionTurn } from "@opencode/util/session-turn"
import {
cacheReuseDrop,
messageBoundaryIDs,
reduceSessionRows,
reduceSessionRows as reduceRows,
sessionRowID,
type SessionRow,
} from "../../../src/routes/session/rows"

const reduceSessionRows = (messages: SessionMessageInfo[], inputs = new Set<string>(), turnTokens = false) =>
reduceRows(messages, inputs, turnTokens, "medium")

test("indexed tail footer calculations do not subscribe to an unrelated history prefix", () => {
createRoot((dispose) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/tui/test/config-v2.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ test("shows the TPS default in session settings", () => {
test("shows transcript verbosity in session settings", () => {
expect(settings.find((setting) => setting.path.join(".") === "session.verbosity")).toMatchObject({
category: "Session",
default: "medium",
default: "low",
values: ["low", "medium", "high"],
})
})
Expand Down
5 changes: 4 additions & 1 deletion packages/tui/test/session-backfill-disclosure.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ test("clicking a backfilled thought group toggles it", async () => {
run({
app: { name: "test", version: "test", channel: "test" },
server: { endpoint: { url: server.url.toString() } },
config: { get: async () => ({ animations: false, tabs: { enabled: false } }), update: async () => ({}) },
config: {
get: async () => ({ animations: false, session: { verbosity: "medium" }, tabs: { enabled: false } }),
update: async () => ({}),
},
packages: { prepare: async () => ({ directory: "" }) },
args: { sessionID: session.id },
terminalHandoff: async () => ({ renderer: setup.renderer, mode: "dark", complete: () => {} }),
Expand Down
2 changes: 1 addition & 1 deletion packages/tui/test/session-dialog-resync.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function openDialogThenResync(target: string, dialog: string) {
await using setup = await createAppFixture({
width: 112,
height: 34,
config: { animations: false, tabs: { enabled: false } },
config: { animations: false, session: { verbosity: "medium" }, tabs: { enabled: false } },
args: { sessionID: session.id },
fetch: (url) => {
if (url.pathname === "/api/session") return json({ data: [session], cursor: {} })
Expand Down
1 change: 1 addition & 0 deletions packages/tui/test/session-group-navigation.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ test.each([
config: {
get: async () => ({
animations: false,
session: { verbosity: "medium" },
tabs: { enabled: true, scope: "global" },
keybinds: { "session.messages_last_user": "ctrl+shift+u", "session.message.next": "ctrl+shift+n" },
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/tui/test/session-history-interactions.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ test.each(modes.flatMap((mode) => [100, 48].map((width) => ({ mode, width }))))(
height: 30,
state: state.path,
args: { sessionID: session.id },
config: { animations: false, tabs: { enabled: true, scope: "global" } },
config: { animations: false, session: { verbosity: "medium" }, tabs: { enabled: true, scope: "global" } },
fetch: async (url) => {
if (url.pathname === "/api/session") return json({ data: [session, other], cursor: {} })
if (url.pathname === `/api/session/${session.id}`) return json({ data: session })
Expand Down
1 change: 1 addition & 0 deletions packages/tui/test/session-mount-budget.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ test("an expanded group spends the mounting budget that older rows used", async
config: {
get: async () => ({
animations: false,
session: { verbosity: "medium" },
tabs: { enabled: false },
keybinds: { "session.messages_last_user": "ctrl+shift+u", "session.last": "ctrl+shift+l" },
}),
Expand Down
Loading