Repository navigation
feat: add LoadArtifact + PatchArtifact tools, fix field mapping bugs (FC-2, FC-3) - #36
Merged
Merged
Conversation
…(FC-2, FC-3) - FC-2: LoadArtifactTool calls artifact.get_content RPC - Load artifact content by ID with optional version - Preview truncation at 2000 chars in tool result - FC-3: PatchArtifactTool calls artifact.patch RPC - 4 operations: replace_section, append, prepend, delete_section - Anchor matching for markdown headings and code functions - Optimistic lock via expected_version - Fix: ArtifactCreateTool field mapping (result.id → result.artifact.id) - Fix: ArtifactUpdateTool field mapping (result.version → result.version.version_num) - Extract shared artifactsRPC helper from duplicate implementations - Register LoadArtifact + PatchArtifact in tools.ts + FULL_TOOLS set - Update ArtifactCreateTool/UpdateArtifact prompts to reference new tools Upstream dependency: fusion-artifacts-engine v0.3.0 (artifact.patch + artifact.get_content) Co-Authored-By: Claude <[email protected]>
dahai80
added a commit
that referenced
this pull request
Aug 29, 2026
….1.1 slice #36) (#209) REPL.tsx agent-transcript disk-load bootstrap useEffect body (26 LOC, PURE-ASYNC-HELPER class, 2nd — like slice #23 onInit / #31 initialMessage) extracted to src/screens/agentTranscriptBootstrap.ts applyAgentTranscriptBootstrap(ctx). 3 closure deps (viewingAgentTaskId, needsBootstrap, setAppState); guard stays in REPL thin shell. 2 now-dead imports removed from REPL (getAgentTranscript sole-user, asAgentId sole-user; isLocalAgentTask kept — 2 residual uses). Byte-identical behavior; gates 0/921/new-file-clean/build:dev. Co-authored-by: Claude Fable 5 <[email protected]>
dahai80
added a commit
that referenced
this pull request
Aug 29, 2026
… slice #37) (#210) Transcript key (less-style open-in-$EDITOR) render block extracted from REPL.tsx useInput v-branch to applyEditorOpenInExternalEditor in editorStatusRender.ts. PURE-ASYNC-HELPER class (3rd, like slice #23 onInit / #31 processInitialMessage / #36 agentTranscriptBootstrap). ctx carries 3 refs (gen/timer/rendering) + setEditorStatus + deferredMessages + tools (closure deps). Imported helpers (renderMessagesToPlainText/openFileInExternalEditor/writeFile/join/tmpdir) imported directly in new file, not via ctx. double-tap-drop guard + gen-capture + staleness-aware setStatus stay in helper (ref-mutate, not useInput deps). event.stopImmediatePropagation stays REPL thin shell (input-event concern). No JSX, no hooks. REPL 5660 -> 5614 (-46). 5 sole-user imports removed (writeFile, tmpdir, join, openFileInExternalEditor, renderMessagesToPlainText); dirname kept (multi-use). Byte-identical behavior. Gates: typecheck 0 / 921 tests / biome new-file-formatted (3 node-protocol infos match repo convention, like slice #33) / build:dev green. Co-authored-by: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Phase 2 of artifact enhancement (#32 → #35), now that upstream fusion-artifacts-engine v0.3.0 provides
artifact.patchandartifact.get_contentRPCs.New Tools
artifact.get_contentRPC. Preview truncation at 2000 chars.artifact.patchRPC. 4 operations (replace_section/append/prepend/delete_section), anchor matching, optimistic lock.Bug Fixes
result.id→result.artifact.id,result.version→result.version.version_numresult.id→result.version.artifact_id,result.version→result.version.version_numRefactor
artifactsRPChelper tosrc/tools/shared/artifactsRPC.tsRegistration
LoadArtifact+PatchArtifacttogetAllBaseTools()andFULL_TOOLSsetUpstream Dependencies
Closes #35
🤖 Generated with Claude Code