Skip to content

Inline-code file links point to files that don't exist (404 in file preview) #6664

Closed

Description

@Kylo6

Version: bb 0.48.0 (desktop, macOS)

What happens. An assistant writes a file name in inline code, e.g. scheduler.py.
The chat turns it into a link resolved against the thread environment root. The file
actually lives elsewhere, so the click opens a file preview that fails:
HTTP 404: Path does not exist: <worktree>/scheduler.py.

Where. markdown-preview-*.js, Bl({codeText, localFileRouting}): any whitespace-free
inline code that has an extension, a line suffix, or a ./// prefix becomes a link
(Rl → y({baseDir: workspaceRootPath, rootPath: workspaceRootPath})). There is no
existence check and no setting to turn this off.

Scale. On our project's recent threads (last assistant message per thread), 64 of the
76 inline-code auto-links (84 %) pointed to a missing file. Identifiers with dots get linked
too (thread.idle, bb.app, 127.0.0.1:8791).

Ask, in order of preference.

  1. Only link inline code when the resolved path exists (the server already answers 404, so
    a batched existence check or a "missing" state rendered as plain code would do).
  2. Or a setting to turn inline-code auto-linking off (explicit Markdown links unaffected).

Workaround we use. A local plugin with an app overlay that marks
a[data-clipboard-inline-code] after an existence RPC and disables the missing ones. It
depends on that internal attribute, so a supported hook would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions