From ac8639540e9b203f3786244a320bb9fae120f8e9 Mon Sep 17 00:00:00 2001 From: leohenon <77656081+lhenon999@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:44:15 +0800 Subject: [PATCH 1/2] feat: add cursor line highlight in copy mode --- .../src/cli/cmd/tui/routes/session/index.tsx | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index ff9bc724bd03..0aa379f406db 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -1318,6 +1318,14 @@ function UserMessage(props: { flexShrink={0} > + @@ -1541,6 +1549,14 @@ function TextPart(props: { + @@ -1632,6 +1648,14 @@ function ToolPart(props: { + From b60fa0154304cdb9f1205f39dcf759390739caa0 Mon Sep 17 00:00:00 2001 From: leohenon <77656081+lhenon999@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:51:19 +0800 Subject: [PATCH 2/2] feat: hide cursor line highlight in visual mode --- .../src/cli/cmd/tui/routes/session/index.tsx | 66 ++++++++++--------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index 0aa379f406db..cfc2dfc9a114 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -1174,7 +1174,7 @@ export function Session() { void index: number pending?: string - copy?: { line: number; col: number } + copy?: { line: number; col: number; visual?: boolean } highlights?: CopyHighlight[] }) { const ctx = use() @@ -1318,14 +1318,16 @@ function UserMessage(props: { flexShrink={0} > - + + + @@ -1395,7 +1397,7 @@ function AssistantMessage(props: { message: AssistantMessage parts: Part[] last: boolean - copy?: CopyRow + copy?: CopyRow & { visual?: boolean } highlights?: Map }) { const ctx = use() @@ -1540,7 +1542,7 @@ function TextPart(props: { last: boolean part: TextPart message: AssistantMessage - copy?: CopyRow + copy?: CopyRow & { visual?: boolean } highlights?: CopyHighlight[] }) { const ctx = use() @@ -1549,14 +1551,16 @@ function TextPart(props: { - + + + @@ -1604,7 +1608,7 @@ function ToolPart(props: { last: boolean part: ToolPart message: AssistantMessage - copy?: CopyRow + copy?: CopyRow & { visual?: boolean } highlights?: CopyHighlight[] }) { const ctx = use() @@ -1648,14 +1652,16 @@ function ToolPart(props: { - + + +