Skip to content

feat: add file editing/opening, embedded terminal, and model capability checks - #577

Open
yn-lo wants to merge 3 commits into
agegr:mainfrom
yn-lo:main
Open

feat: add file editing/opening, embedded terminal, and model capability checks#577
yn-lo wants to merge 3 commits into
agegr:mainfrom
yn-lo:main

Conversation

@yn-lo

@yn-lo yn-lo commented Aug 22, 2026

Copy link
Copy Markdown

Summary of Changes

  • In-browser Text File Editing:

  • Added inline editing capabilities for text files in TextFileViewer.tsx.

  • Integrated a textarea editor with support for keyboard shortcuts (Cmd/Ctrl+S to save, Escape to cancel).

  • Added backend save API (POST /api/files/[...path]?type=save) with path validation, symlink authorization, and a 256KB file size limit check.

  • System File Manager Integration:

  • Added a button in SessionSidebar.tsx to open the current working directory in the OS file manager.

  • Implemented backend handler (POST /api/files/[...path]?type=open-directory) using cross-platform system commands (explorer, open, xdg-open).

  • Localization:

  • Added corresponding i18n keys and translations in en.ts and zh-CN.ts for file editing, saving, and opening directory actions.

@yn-lo yn-lo closed this Aug 22, 2026
@yn-lo yn-lo reopened this Aug 22, 2026
yn-lo added 2 commits August 22, 2026 11:45
1. add acceptsImages field to model related type definitions
2. detect model image input support via m.input.includes("image") in model loading
3. add i18n messages for disabled image input and reasoning
4. add runtime checks to disable image attach and reasoning controls when unsupported
Add complete terminal integration, including:

1. Backend session management based on node-pty
2. Server-Sent Events for real-time data streaming
3. Multi-tab terminal panel with drag-to-resize
4. xterm.js terminal UI with light/dark theme support
5. Automatic detection of Windows Git Bash, plus a custom shell environment variable override

New dependencies: `node-pty`, `@xterm/xterm`, `@xterm/addon-fit`
@yn-lo yn-lo closed this Aug 22, 2026
@yn-lo yn-lo reopened this Aug 22, 2026
@yn-lo yn-lo changed the title feat(files): edit text files and open folders in the system file manager feat: add file editing/opening, embedded terminal, and model capability checks Aug 22, 2026
@yn-lo

yn-lo commented Aug 22, 2026

Copy link
Copy Markdown
Author

Summary
Introduces online file editing and opening via system file manager, an SSE-backed web terminal panel, and vision capability checks for models to enhance workspace interactivity and developer experience.

Key Changes
File Management: Added APIs to edit and save files directly (up to 256KB) with strict path/symlink security checks, plus an option to open the current workspace in the OS file manager.

Embedded Terminal: Implemented a real-time Web Terminal using SSE for streaming output, supported by endpoints for input, resizing, and session lifecycle management (TerminalPanel & TerminalTabs).

Model Capability Checks: Updated model metadata with acceptsImages to dynamically detect and toggle Vision/image-input UI features.

UI & i18n: Added localized strings (EN/ZH) and integrated terminal tabs into the main shell layout.

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