Skip to content

feat(files): scoped search, in-place edits, and ranged reads for agent memory filesystems - #7393

Merged
icecrasher321 merged 42 commits into
stagingfrom
feat/file-memory-ops
Sep 3, 2026
Merged

feat(files): scoped search, in-place edits, and ranged reads for agent memory filesystems#7393
icecrasher321 merged 42 commits into
stagingfrom
feat/file-memory-ops

Conversation

@mzxchandra

@mzxchandra mzxchandra commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add folder-scoped File operations with multi-folder selection, fork-safe references, and Include Subfolders in advanced options
  • replace separate edit and insert actions with Apply Edit: exact replacement, replaceAll, and anchor-based replace, insert, or delete
  • keep the V2 API, CLI, generated metadata, tests, and English docs aligned

Validation

  • lint and 45 repository audits
  • 249 focused app tests; 788 CLI tests passed, 1 skipped
  • migration safety, OpenAPI/generated-contract checks, and local db:push

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 2, 2026 11:35pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR expands workspace-file operations with scoped folder selection, precise in-place edits, ranged reads, and corresponding API, CLI, workflow, forking, migration, test, and documentation updates.

  • Adds folder-scoped search and file selection with optional recursive expansion.
  • Adds exact and anchor-based file editing plus line-ranged reads.
  • Aligns workspace-fork mappings, generated contracts, CLI commands, and documentation with the new behavior.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/lib/workspace-files/application/edit-workspace-file-content.ts Introduces the typed application use case for authorized, conflict-aware in-place workspace-file edits.
apps/sim/lib/workspace-files/application/search-workspace-file-content.ts Adds folder-scoped workspace-file content search and scoped index-coverage reporting.
apps/sim/lib/workspace-files/application/read-workspace-file-text.ts Adds optional line windows and associated range metadata to text extraction.
apps/sim/lib/workspace-files/application/edit-workspace-file-content.test.ts Covers edit behavior using a corrected session principal fixture and precisely typed edit helper.
apps/sim/ee/workspace-forking/lib/remap/remap-references.ts Extends fork reference remapping to preserve workspace file-folder scopes.
apps/sim/lib/api/contracts/v2/files.ts Aligns V2 file contracts with scoped search, ranged reads, folder operations, and partial edits.
packages/db/migrations/0320_striped_shatterstar.sql Adds the database migration supporting the new workspace-file folder and reference behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Client[Workflow, API, or CLI client] --> Scope[Resolve workspace and folder scope]
  Scope --> Search[Search indexed file content]
  Scope --> Read[Read selected files and line ranges]
  Scope --> Edit[Apply exact or anchor-based edit]
  Scope --> Manage[Create, move, delete, or restore folders]
  Search --> Result[Scoped results and coverage status]
  Read --> Result
  Edit --> Result
  Manage --> Result
  Fork[Workspace fork or sync] --> Mapping[Map files and folder paths]
  Mapping --> Scope
Loading

Reviews (20): Last reviewed commit: "fix(files): keep replacement content lit..." | Re-trigger Greptile

Comment thread apps/sim/lib/workspace-files/application/edit-workspace-file-content.test.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 38 files

Re-trigger cubic

Comment thread apps/sim/lib/workspace-files/edit-content.ts Outdated
Comment thread apps/sim/lib/api/contracts/v2/files.ts Outdated
Comment thread apps/sim/lib/api/contracts/tools/file.ts Outdated
Comment thread apps/sim/app/api/v2/files/search/route.ts Outdated
Comment thread apps/sim/blocks/blocks/file.ts
Comment thread apps/docs/openapi-v2-files-audit.json
Comment thread apps/sim/lib/workspace-files/application/edit-workspace-file-content.ts Outdated
Comment thread apps/sim/lib/workspace-files/application/edit-workspace-file-content.test.ts Outdated
Comment thread apps/docs/content/docs/integrations/file.mdx Outdated
Comment thread apps/docs/content/docs/cli/files.mdx Outdated
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic review

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed

Re-trigger cubic

Comment thread apps/sim/tools/file/search.ts Outdated
Comment thread apps/sim/lib/api/contracts/v2/files.ts Outdated
Comment thread apps/sim/blocks/blocks/file.ts Outdated
Comment thread apps/sim/lib/internal/file/operations.ts Outdated
Comment thread apps/sim/lib/internal/file/operations.ts
Comment thread apps/docs/content/docs/cli/reference.mdx Outdated
Comment thread apps/sim/lib/folders/scope.ts
Comment thread apps/sim/lib/api/contracts/v2/files.ts Outdated
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic review

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/api/contracts/tools/file.ts Outdated
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic review

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic review

@icecrasher321

Copy link
Copy Markdown
Collaborator

@cubic-dev-ai review this PR

@icecrasher321

Copy link
Copy Markdown
Collaborator

@greptile

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 135 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/workspace-files/edit-content.ts Outdated
Comment thread apps/sim/lib/internal/file/operations.ts Outdated
Comment thread apps/sim/lib/internal/file/operations.test.ts
@icecrasher321

Copy link
Copy Markdown
Collaborator

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 135 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/workspace-files/edit-content.ts Outdated
@icecrasher321

Copy link
Copy Markdown
Collaborator

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 136 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/workspace-files/edit-content.ts Outdated
Comment thread apps/sim/lib/copilot/tools/server/files/edit-content.ts
@icecrasher321

Copy link
Copy Markdown
Collaborator

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 137 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Re-trigger cubic

@icecrasher321
icecrasher321 merged commit 48d6ef5 into staging Sep 3, 2026
29 checks passed
@icecrasher321
icecrasher321 deleted the feat/file-memory-ops branch September 3, 2026 01:50
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.

2 participants