Skip to content

refactor: simplify file preview and clean up session context summary#183

Closed
bbsngg wants to merge 1 commit intomainfrom
split/f-file-preview-refactor
Closed

refactor: simplify file preview and clean up session context summary#183
bbsngg wants to merge 1 commit intomainfrom
split/f-file-preview-refactor

Conversation

@bbsngg
Copy link
Copy Markdown
Contributor

@bbsngg bbsngg commented Apr 15, 2026

Summary

  • Remove JSON syntax highlighting from ChatContextFilePreview (use plain text for non-markdown/html/media)
  • Switch skill preview in ChatContextSidebar to global skills tree API
  • Remove ~500 lines of unused path-parsing regexes and hardcoded file extension lists from sessionContextSummary

Part of the session lifecycle PR split (1/6, independent).

Test plan

  • File preview renders correctly for text, markdown, image, PDF, audio, video files
  • Skill preview in context sidebar loads via global skills API
  • npx vitest run src/components/chat/utils/__tests__/sessionContextSummary.test.ts passes

🤖 Generated with Claude Code

- Remove JSON syntax highlighting from ChatContextFilePreview (use plain
  text rendering for all non-markdown/html/media files)
- Inline file extension constants instead of importing from shared module
- Replace AbortController with simpler cancelled flag pattern
- Switch skill preview in ChatContextSidebar to use global skills tree API
  instead of resolveSkill endpoint
- Remove ~500 lines of unused path-parsing regexes, shell-token patterns,
  and hardcoded file extension/basename lists from sessionContextSummary
- Remove tests for deleted resolveSessionContextProjectRoot and
  path-parsing functions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bbsngg
Copy link
Copy Markdown
Contributor Author

bbsngg commented Apr 15, 2026

Split from #170 (1/6). Independent — can be merged immediately. See #170 for full split plan.

bbsngg

This comment was marked as low quality.

@bbsngg bbsngg closed this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant