-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: add DeepSeek models, fix Shell tab switching, add image/PDF preview #742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
z2512690268
wants to merge
2
commits into
siteboon:main
from
z2512690268:feature/shell-fixes-and-file-preview
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,44 @@ | ||
| // Binary file extensions (images are handled by ImageViewer, not here) | ||
| const IMAGE_EXTENSIONS = [ | ||
| 'png', 'jpg', 'jpeg', 'gif', 'svg', 'webp', 'ico', 'bmp', | ||
| ]; | ||
|
|
||
| const PDF_EXTENSIONS = ['pdf']; | ||
|
|
||
| // Truly unviewable binary formats (no in-browser preview possible) | ||
| const BINARY_EXTENSIONS = [ | ||
| // Archives | ||
| 'zip', 'tar', 'gz', 'rar', '7z', 'bz2', 'xz', | ||
| // Executables | ||
| 'exe', 'dll', 'so', 'dylib', 'app', 'dmg', 'msi', | ||
| // Media | ||
| // Media (audio/video — could be previewable, but not in scope yet) | ||
| 'mp3', 'mp4', 'wav', 'avi', 'mov', 'mkv', 'flv', 'wmv', 'm4a', 'ogg', | ||
| // Documents | ||
| 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp', | ||
| // Documents (non-PDF) | ||
| 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp', | ||
| // Fonts | ||
| 'ttf', 'otf', 'woff', 'woff2', 'eot', | ||
| // Database | ||
| 'db', 'sqlite', 'sqlite3', | ||
| // Other binary | ||
| 'bin', 'dat', 'iso', 'img', 'class', 'jar', 'war', 'pyc', 'pyo' | ||
| 'bin', 'dat', 'iso', 'img', 'class', 'jar', 'war', 'pyc', 'pyo', | ||
| ]; | ||
|
|
||
| export const isBinaryFile = (filename: string): boolean => { | ||
| const ext = filename.split('.').pop()?.toLowerCase(); | ||
| return BINARY_EXTENSIONS.includes(ext ?? ''); | ||
| const getExt = (filename: string): string => | ||
| (filename.split('.').pop() ?? '').toLowerCase(); | ||
|
|
||
| export const isImageFile = (filename: string): boolean => | ||
| IMAGE_EXTENSIONS.includes(getExt(filename)); | ||
|
|
||
| export const isPdfFile = (filename: string): boolean => | ||
| PDF_EXTENSIONS.includes(getExt(filename)); | ||
|
|
||
| export const isBinaryFile = (filename: string): boolean => | ||
| BINARY_EXTENSIONS.includes(getExt(filename)); | ||
|
|
||
| export type FileCategory = 'text' | 'image' | 'pdf' | 'binary'; | ||
|
|
||
| export const getFileCategory = (filename: string): FileCategory => { | ||
| if (isImageFile(filename)) return 'image'; | ||
| if (isPdfFile(filename)) return 'pdf'; | ||
| if (isBinaryFile(filename)) return 'binary'; | ||
| return 'text'; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: siteboon/claudecodeui
Length of output: 11976
🏁 Script executed:
Repository: siteboon/claudecodeui
Length of output: 5764
🏁 Script executed:
Repository: siteboon/claudecodeui
Length of output: 47
🏁 Script executed:
Repository: siteboon/claudecodeui
Length of output: 2539
🏁 Script executed:
Repository: siteboon/claudecodeui
Length of output: 3477
🏁 Script executed:
Repository: siteboon/claudecodeui
Length of output: 7769
🏁 Script executed:
Repository: siteboon/claudecodeui
Length of output: 3921
🏁 Script executed:
Repository: siteboon/claudecodeui
Length of output: 1618
🏁 Script executed:
Repository: siteboon/claudecodeui
Length of output: 309
DeepSeek models misclassified under
CLAUDE_MODELS— will cause runtime failuresCLAUDE_MODELSis explicitly the "Claude (Anthropic) Models" section, and the backend's provider dispatch logic (server/routes/agent.js:942) uses hardcoded if/else on provider ID. When a user selects a DeepSeek model from the frontend, the provider remains"claude", triggeringqueryClaudeSDK()at runtime.The
queryClaudeSDK()function (server/claude-sdk.js:207) passes the model value directly to the Anthropic SDK without any endpoint override or model-based routing. This means a request withmodel="deepseek-v4-flash"will be sent to the Anthropic API, which will reject it as an invalid model, causing the request to fail.These models require either a dedicated
DEEPSEEK_MODELSconstant with a correspondingPROVIDERSentry and backend handler, or routing logic that intercepts DeepSeek model names and redirects them to the correct endpoint and API client.🤖 Prompt for AI Agents