Skip to content

Refactor: Remove dead code from file tool handling#68

Merged
FL4TLiN3 merged 3 commits intomainfrom
refactor/remove-dead-file-tool-code
Dec 8, 2025
Merged

Refactor: Remove dead code from file tool handling#68
FL4TLiN3 merged 3 commits intomainfrom
refactor/remove-dead-file-tool-code

Conversation

@FL4TLiN3
Copy link
Contributor

@FL4TLiN3 FL4TLiN3 commented Dec 8, 2025

Summary

Remove dead code that was left after PR #62 consolidated file tool handling into calling-tool.ts.

Changes

Removed Files

  • resolving-pdf-file.ts and its test
  • resolving-image-file.ts and its test

Removed from State Machine

  • ResolvingPdfFile state
  • ResolvingImageFile state
  • resolvePdfFile event handler
  • resolveImageFile event handler

Removed from @perstack/core

  • resolvePdfFile event type and factory
  • resolveImageFile event type and factory

Updated

  • TUI/CLI event handlers (removed dead cases)
  • README.md state machine diagram

Testing

  • ✅ All unit tests pass
  • ✅ All E2E tests pass (11 test files, 37 tests)
  • ✅ Added multi-modal E2E tests to verify PDF/image reading works correctly

Closes #66


Note

Removes legacy PDF/image resolve events and states from core/runtime, updates TUI and docs accordingly, and adds multi-modal E2E tests with expert configs and fixtures.

  • Runtime/Core
    • Remove resolvePdfFile/resolveImageFile events and factories from packages/core/src/schemas/runtime.ts.
    • Simplify state machine in packages/runtime/src/runtime-state-machine.ts by deleting ResolvingPdfFile/ResolvingImageFile states and related transitions.
    • Delete dead logic and tests: packages/runtime/src/states/resolving-pdf-file.ts, resolving-pdf-file.test.ts, resolving-image-file.ts, resolving-image-file.test.ts.
  • TUI
    • Drop handling for removed events in packages/perstack/src/lib/tui.tsx and packages/tui/src/hooks/state/use-step-store.ts.
  • Docs
    • Update state machine docs in packages/runtime/README.md (remove PDF/image resolve paths).
  • E2E Tests
    • Add multi‑modal tests e2e/multi-modal.test.ts and expert config e2e/experts/multi-modal.toml with fixtures (e2e/fixtures/test.pdf, test.gif).
    • Expand e2e/README.md with new test files/categories and manual verification notes.
  • Misc
    • Add placeholder changeset .changeset/twenty-dragons-kick.md.

Written by Cursor Bugbot for commit 5b75308. This will update automatically on new commits. Configure here.

- Delete resolving-pdf-file.ts and resolving-image-file.ts
- Remove ResolvingPdfFile/ResolvingImageFile states from state machine
- Remove resolvePdfFile/resolveImageFile events from @perstack/core
- Remove dead cases from TUI/CLI event handlers
- Update README.md state machine diagram
@vercel
Copy link

vercel bot commented Dec 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
perstack Ignored Ignored Preview Dec 8, 2025 6:40pm

@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@FL4TLiN3 FL4TLiN3 force-pushed the refactor/remove-dead-file-tool-code branch from 3d263fd to 7e58a6b Compare December 8, 2025 18:31
Verify that readPdfFile and readImageFile correctly process files
by having experts summarize/describe the content.
@FL4TLiN3 FL4TLiN3 force-pushed the refactor/remove-dead-file-tool-code branch from 7e58a6b to de89615 Compare December 8, 2025 18:39
@FL4TLiN3 FL4TLiN3 merged commit bcb81b9 into main Dec 8, 2025
9 checks passed
@FL4TLiN3 FL4TLiN3 deleted the refactor/remove-dead-file-tool-code branch December 8, 2025 18:44
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.

Refactor: Remove dead code from file tool handling

1 participant