Rewrite artifacts documentation for clarity and correctness#694
Conversation
- index.mdx: rewritten as a focused overview with Mermaid flow diagram, quick start, and navigation cards - runner-configuration.mdx: clear wiring instructions for AgentBuilder and Runner direct, auto-save explanation, file upload example - context-integration.mdx: explains CallbackContext vs ToolContext, tabbed examples for before/after agent and model callbacks, tool example with listArtifacts - scoping-and-versioning.mdx: explains why to choose each scope, fixes undefined variables in deletion examples, adds listVersions context - service-implementations.mdx: comparison table with warning against InMemory in prod, full custom service interface, fixes null→undefined in troubleshooting - best-practices.mdx: fixes Part|null→Part|undefined return type, adds sequential vs parallel batch example, concrete deletion examples with usage - recipes.mdx: adds opening paragraph and scenario context for each recipe - troubleshooting.mdx: adds cause column to issues table, fixes wiring check to use AgentBuilder, adds GCS grant command Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
Code Review
This pull request performs a comprehensive overhaul of the Artifacts documentation, improving clarity through simplified descriptions, visual aids like Mermaid diagrams, and updated code examples across all sections. Key feedback points out type mismatches in examples where undefined was used instead of null to align with the BaseArtifactService interface. Additionally, the removal of the index page from the sidebar configuration in meta.json was flagged as a potential navigation issue.
- best-practices.mdx: loadWithCache return type Part|undefined → Part|null to match BaseArtifactService interface - service-implementations.mdx: custom service loadArtifact return type Part|undefined → Part|null to match interface - meta.json: restore "index" to pages array so artifacts overview appears in sidebar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@claude review |
|
Claude finished @Timonwa's task —— View job I'll review this comprehensive rewrite of the artifacts documentation. Review Progress
Detailed ReviewSummaryThis PR significantly improves the artifacts documentation with clear examples, better organization, and enhanced clarity. The rewrite successfully addresses many previous issues while introducing comprehensive coverage of the artifact system. However, there are several type accuracy issues that need to be resolved. 🔴 Critical Issues1. Type Mismatch:
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pull Request
Description
Full rewrite of all 8 pages in the artifacts documentation section (
apps/docs/content/docs/framework/artifacts/) to match the style established in PR #689 (plugins section rewrite). Every page was audited for first-read clarity, correct API usage, and completeness.AgentBuilderandRunnerdirect patterns, explained auto-save behaviour end-to-end, fixedBuffer.from()placeholder that didn't compile.CallbackContextvsToolContextupfront, tabbed examples for all four callback types, restoredafterModelCallbackand session summary examples.InMemoryArtifactService, full custom service interface with all five methods, fixednull→undefinedin troubleshooting.Part | null→Part | undefinedreturn type, ❌/✅ sequential vs parallel batch example, concrete deletion examples with usage call, retry section with usage example.AgentBuilder(no undefined variables), added GCS IAM grant command.Related Issue
Closes #692
Type of Change
How Has This Been Tested?
packages/adk/src/artifacts/source for correct method signatures and return typesagentBuilder()lowercase calls replaced with correctAgentBuilder.create()static factory pattern throughoutagent,appName,userId,sessionId) replaced with concrete valuesPart | nullreturn type corrected toPart | undefinedto match actualloadArtifactsignatureChecklist
Additional Notes
BaseArtifactServiceexport was added topackages/adk/src/artifacts/index.tsin a prior commit on this branch to support the import patterns shown in the docs.