@@ -9,7 +9,6 @@ import (
99
1010 tea "charm.land/bubbletea/v2"
1111 "charm.land/lipgloss/v2"
12- "github.com/charmbracelet/x/ansi"
1312 "github.com/xonecas/symb/internal/highlight"
1413 )
1514
@@ -225,10 +224,9 @@ func (m Model) translateMouse(msg tea.MouseMsg, offX, offY int) tea.Msg {
225224
226225 // isClickableLine returns true if the wrapped line at lineIdx is clickable.
227226 // Tool result entries (first line only, which has the [view] button) and undo
228-// entries are always clickable. Plain text lines are clickable only if they
229-// contain a file path reference.
227+// entries are always clickable.
230228 func (m *Model) isClickableLine(lineIdx int) bool {
231- lines := m.wrappedConvLines() // ensures convLineSource is also fresh
229+ m.wrappedConvLines() // ensures convLineSource is also fresh
232230 src := m.convLineSource
233231 if lineIdx < 0 || lineIdx >= len(src) {
234232 return false
@@ -250,17 +248,13 @@ func (m *Model) isClickableLine(lineIdx int) bool {
250248 case entryToolDiag, entryToolCall, entrySeparator:
251249 return false
252250 default:
253- // Plain text: clickable if it contains a file path.
254- if lineIdx >= len(lines) {
255- return false
256- }
257- return filePathRe.MatchString(ansi.Strip(lines[lineIdx]))
251+ return false
258252 }
259253 }
260254
261255 // handleConvClick resolves a click on a wrapped conversation line.
262256 // Tool result [view] buttons open the relevant content in the editor.
263-// Undo buttons trigger an undo. Plain text file paths open the file.
257+// Undo buttons trigger an undo.
264258 func (m *Model) handleConvClick(wrappedLine, col int) tea.Cmd {
265259 m.wrappedConvLines() // ensure convLineSource is fresh
266260 src := m.convLineSource
@@ -291,12 +285,7 @@ func (m *Model) handleConvClick(wrappedLine, col int) tea.Cmd {
291285 return nil
292286
293287 default:
294- // Plain text: try to open a file path reference.
295- lines := m.wrappedConvLines()
296- if wrappedLine >= len(lines) {
297- return nil
298- }
299- return m.tryOpenFilePath(ansi.Strip(lines[wrappedLine]))
288+ return nil
300289 }
301290 }
302291
@@ -388,19 +377,6 @@ func (m *Model) showRawContent(content, language string) {
388377 m.setFocus(focusEditor)
389378 }
390379
391-// tryOpenFilePath looks for a file:line reference in text and opens it in the editor.
392-func (m *Model) tryOpenFilePath(text string) tea.Cmd {
393- matches := filePathRe.FindStringSubmatch(text)
394- if matches == nil {
395- return nil
396- }
397- path := matches[1]
398- lineNum := 0
399- if matches[2] != "" {
400- lineNum, _ = strconv.Atoi(matches[2])
401- }
402- return m.openFile(path, lineNum)
403-}
404380
405381 // openFile loads a file into the editor. path is relative to cwd.
406382 func (m *Model) openFile(path string, lineNum int) tea.Cmd {