Skip to content

Feature: Filetree Option and Subtask System#464

Open
seedlord wants to merge 32 commits intorobertpiosik:devfrom
seedlord:feat/filetreeoption
Open

Feature: Filetree Option and Subtask System#464
seedlord wants to merge 32 commits intorobertpiosik:devfrom
seedlord:feat/filetreeoption

Conversation

@seedlord
Copy link

filetreesubtasksystem.mp4

🌟 Major Features & Workflow Enhancements

1. Autonomous Planning & Smart Subtask Routing

  • Markdown-Based Subtasks: The LLM can now break down complex requests into structured, multi-step execution plans. We replaced the clunky XML format with clean, native Markdown headings and lists, making the AI's output beautifully readable in the chat.
  • Adaptive Planning: The prompt instructions were refactored to be flexible. The AI will generate multi-step plans for complex features, but will intelligently fallback to a single subtask for simple, minor requests.
  • Smart Routing Engine:
    • Single Task: If the AI generates only 1 subtask, the system instantly auto-fills the chat, automatically checks the relevant files, and switches to "Edit Context" mode so you can continue working immediately. (It also no longer saves this flitting task to the Home menu to prevent clutter).
    • Multiple Tasks: If the AI generates a multi-step plan, it safely saves the tasks (appending them to existing ones without data loss) and routes you to the Home view. You can then execute them step-by-step using the "Forward" button.

2. Seamless Git SCM Integration

  • Dedicated Commit Messages: The system now forces the AI to generate a specific commit message for every subtask. The parser cleanly separates this commit message from the main prompt instruction.
  • "Fill SCM" Button: When executing a task, a stylish new banner appears above the chat input containing the pending commit message. A "Fill SCM" button allows you to push this text directly into the native VS Code Source Control (Git) commit field with a single click.

✨ UI & UX Improvements

3. Enhanced Task View

  • File Visibility & Token Counts: Tasks in the Home menu now display a clean, native-looking list of all affected files right below the task description. Each file explicitly shows its pre-calculated token count (e.g., 1.2k tokens).
  • Clickable Task Files: File paths within the task list are now interactive. Clicking a file will immediately open and focus it in the VS Code editor.
  • Reliable State Management: Migrated the task storage to a unified TasksUtils system, entirely eliminating bugs related to "ghost tasks" or desynchronized deletions.

⚡ Performance & Context Optimizations

4. Zero-Lag Context Toggling & File Tree Mode

  • "Only File Tree" Mode: Introduced a new context checkbox allowing users to send only the file tree structure to the LLM without reading the file contents, drastically saving tokens for architectural questions. Every file tree listing gets its token count appended in the contexprompt.
  • Simultaneous Token Calculation: Completely overhauled the TokenCalculator. It now calculates all three token variations (Total, Shrink, and Path-only) simultaneously in a single pass.
  • Instant UI Updates: Because all token values are cached upfront, toggling between "Shrink Source Code" and "Only File Tree" checkboxes happens instantly with zero re-crunching lag.
  • Accurate Progress Bar: The token progress bar below the chat now perfectly adapts to reflect the exact token sum based on the currently active context modifiers.

🐛 Core Bug Fixes & Stability

5. Bulletproof Parsing & Execution

  • No More Freezes: Fixed a critical bug where the system would remain permanently stuck in an "in progress" state if the LLM responded with relevant files or subtasks but no actual code edits.
  • Smart Markdown Parser: The clipboard parser is now heavily fortified. It actively ignores system keywords (like **Relevant files:** or **Subtasks:**) if they are accidentally mentioned by the AI inside markdown code blocks, preventing false positives.
  • Race Condition Fixed: Added a slight delay when forwarding a task to the chat. This ensures the backend has enough time to completely switch to the "Edit Context" mode before it attempts to auto-check the task's files.
  • Cross-Platform Path Matching: Normalized all file paths (handling Windows \ and Mac/Linux / differences) to ensure that files approved in the "Relevant Files" modal are flawlessly matched and checked when a task is executed.

seedlord added 30 commits March 12, 2026 07:18
…ree") and adjustment of the token bar below the chat so that it reacts to this state.
…ag/crunching and correct generation of the prompt for the LLM.
…ind Relevant Files" mode, which can then be processed phase by phase by the user/system.
…values ​​(Total, Shrink, Path-only) only once and stores them in the array/tuple. Toggleing the checkbox will then no longer reread files, but only change the displayed variable value. At the same time, we adjust the FilesCollector so that it appends the token count to the file path in the format (1.2k tokens).
…xpanded, and implementing the requested Total (Modified) display.
…played below the chat (the sum of the modified tokens), and that the checkboxes interact smoothly with each other (e.g., exclude each other if desired).
…les in context

- Fix empty subtask bugs and `trim()` crashes by properly mapping the LLM parsed output to the `text` property with robust fallbacks.
- Extend the `Task` type to include an optional `files` array.
- Update the `response-processor` to store parsed relative file paths into the created tasks.
- Ensure that for the first auto-started subtask, only files explicitly approved by the user in the popup are checked.
- Enhance the task "Forward" button to send the full task object instead of just text.
- Implement the `SET_TASK_FILES` message handler in the backend to automatically resolve relative task paths to absolute paths and check them in the workspace context.
- Auto-fill prompt and automatically check task-specific files when only 1 subtask is generated.
- Route user to the Home view (Tasks list) without auto-filling the prompt when multiple subtasks are generated, improving the planning workflow.
- Ensure that tasks only save file paths that the user explicitly approved in the Relevant Files modal.
…ancy, and Append new multiple tasks to existing ones to prevent data loss
- Update `Tasks.tsx` to render the list of affected file paths beneath the task description.
- Add corresponding styles in `Tasks.module.scss` for a dimmed, native VS Code look with file icons.
…k files clickable

- Update `Task` type to support token counts per file and a separate `commit_message` property.
- Update `subtask-directives-parser` to extract `commit_message` cleanly instead of appending it to the instruction.
- Map matched files in `response-processor` to include their pre-calculated token counts.
- Enhance `Tasks.tsx` to render the separate commit message, show formatted token counts, and trigger `on_go_to_file` when a task file is clicked.
- Add `FILL_SCM_COMMIT` command in `PanelProvider` to interact natively with the VS Code Git extension.
- Fix TypeScript error in `use-panel.ts` by mapping `TaskFile` objects to path strings before sending them to the backend.
- Introduce `active_commit_message` state in `use-panel.ts` and listen for backend updates (`SET_ACTIVE_COMMIT_MESSAGE`).
- Render a new "Fill SCM Commit" banner and button in `MainView.tsx` when a commit message is available for the current task.
- Trigger the backend `FILL_SCM_COMMIT` command when the user clicks the button.
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