fix(session-ui): recognize more inline file paths (#34688)

Co-authored-by: Jay <53023+jayair@users.noreply.github.com>
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-07-01 00:52:10 +00:00 committed by GitHub
parent f1407e41c4
commit ae3fefb42a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1921 additions and 7 deletions

View file

@ -13,10 +13,24 @@ describe("inlineCodeKind", () => {
expect(inlineCodeKind(`@opencode-ai/app <StatusPopover />)`)).toBeUndefined()
expect(inlineCodeKind(`sync.data.session`)).toBeUndefined()
expect(inlineCodeKind(`window.api`)).toBeUndefined()
expect(inlineCodeKind(`1.2`)).toBeUndefined()
})
test("detects file and directory paths", () => {
expect(inlineCodeKind(`app.tsx`)).toBe("path")
expect(inlineCodeKind(`vite.config.mjs`)).toBe("path")
expect(inlineCodeKind(`eslint.config.cjs`)).toBe("path")
expect(inlineCodeKind(`app.d.ts`)).toBe("path")
expect(inlineCodeKind(`component.svelte`)).toBe("path")
expect(inlineCodeKind(`schema.graphql`)).toBe("path")
expect(inlineCodeKind(`Dockerfile`)).toBe("path")
expect(inlineCodeKind(`Dockerfile.dev`)).toBe("path")
expect(inlineCodeKind(`.gitignore`)).toBe("path")
expect(inlineCodeKind(`Cargo.lock`)).toBe("path")
expect(inlineCodeKind(`go.sum`)).toBe("path")
expect(inlineCodeKind(`bun.lockb`)).toBe("path")
expect(inlineCodeKind(`terraform.tfvars`)).toBe("path")
expect(inlineCodeKind(`pnpm-lock.yaml`)).toBe("path")
expect(inlineCodeKind(`packages/desktop-electron`)).toBe("path")
expect(inlineCodeKind(`~/.config/opencode`)).toBe("path")
expect(inlineCodeKind(`@opencode-ai/app`)).toBe("path")

File diff suppressed because it is too large Load diff