Skip to content

Support session-scoped external folder refs / 支持会话级外部文件夹引用#5453

Merged
SivanCola merged 5 commits into
esengine:main-v2from
SivanCola:feature/external-folder-session-refs
Jun 28, 2026
Merged

Support session-scoped external folder refs / 支持会话级外部文件夹引用#5453
SivanCola merged 5 commits into
esengine:main-v2from
SivanCola:feature/external-folder-session-refs

Conversation

@SivanCola

@SivanCola SivanCola commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Register folders dropped from outside the workspace as session-scoped workspace references instead of inserting plain absolute-path text.
  • Keep the Composer UI readable by showing real display paths while submitting internal ref tokens that the controller resolves for the current session.
  • Support on-demand external folder subpaths: @<external-folder-token>/sub/file resolves to file content, nested directories can be listed, and file search/autocomplete can return registered external-folder children without exposing raw local paths as submit text.
  • Make folder references explicit and bounded: directory refs inject a capped listing only, note that file contents are not inlined, skip common generated/vendor folders, and tell the model to request listed files when content is needed.
  • Let read-only built-in tools (read_file, ls, grep, glob) resolve registered external-folder token paths so the agent can inspect/search authorized external children on demand without adding those folders as writable workspace roots.
  • Extend workspace previews/open/reveal paths so authorized external ref search results can be inspected through the same desktop UI surfaces.

References

Refs #5370, #5447

Contribution Credits

Cache Impact

Cache-impact: low - touches cache-sensitive boot/tool files, but only to wire runtime path resolution for session-authorized external folder refs; no stable prompt text, model-visible tool schema, or provider request serialization changes.
Cache-guard: go test ./internal/tool/... includes schema-stability coverage for workspace tools with an external read resolver; go test ./internal/boot covers boot wiring.
System-prompt-review: reviewed in this PR; the boot change passes a runtime read-path resolver into the controller/tools and does not alter system prompt composition.

Verification

  • go test ./internal/tool/...
  • go test ./internal/control
  • go test ./internal/boot
  • go test . -run 'TestFileRefs|TestAttachDropped|TestWorkspaceRelativeIn|TestIsImageExt' in the desktop module
  • pnpm --dir desktop/frontend typecheck
  • pnpm --dir desktop/frontend exec tsx src/__tests__/at-matches.test.ts
  • pnpm --dir desktop/frontend exec tsx src/__tests__/composer-goal-toggle.test.tsx
  • git diff --check

@SivanCola SivanCola requested a review from esengine as a code owner June 27, 2026 19:14
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) agent Core agent loop (internal/agent, internal/control) labels Jun 27, 2026
@github-actions github-actions Bot added skills Skill system (internal/skill, internal/tool) config Configuration & setup (internal/config) labels Jun 27, 2026
# Conflicts:
#	internal/boot/boot.go
#	internal/tool/builtin/glob.go
#	internal/tool/builtin/grep.go
#	internal/tool/builtin/ls.go
#	internal/tool/builtin/readfile.go
#	internal/tool/builtin/workspace.go
@SivanCola SivanCola merged commit 427658b into esengine:main-v2 Jun 28, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) desktop Wails desktop app (desktop/**) skills Skill system (internal/skill, internal/tool) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant