You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Read an existing dashboard, slides, and artifact's code and metadata from the current report. "
34
-
"Use this to load previous artifact code into context before modifying with create_artifact or when the user wants to inspect or analyze an existing artifact. "
35
-
"Alwys use this before editing an artifact do have a full view of the existing code, visualizations, and layout. "
34
+
"Use this to load previous artifact code into context before modifying with edit_artifact (or create_artifact) or when the user wants to inspect or analyze an existing artifact. "
35
+
"ALWAYS use this before editing an artifact (edit_artifact) to have a full view of the existing code, visualizations, and layout. "
36
+
"If the user refers to a specific version of an artifact, ALWAYS load that version with this tool to have the correct code context for the edit. "
36
37
"IMPORTANT: The artifact_id is found in previous create_artifact results shown as 'artifact_id: <uuid>' in the conversation. "
37
38
"Do NOT ask the user for URLs or artifact IDs - extract the artifact_id from the conversation context."
visualization_ids: List[str] =Field(default_factory=list, description="All visualization IDs included in this artifact. Use these when making further edits with edit_artifact.")
33
34
version: int=Field(default=1, description="Version number of the artifact")
Copy file name to clipboardExpand all lines: backend/app/ai/tools/schemas/edit_artifact.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ class EditArtifactInput(BaseModel):
13
13
14
14
artifact_id: str=Field(..., description="ID of the existing artifact to edit. Find this in previous create_artifact or read_artifact results as 'artifact_id: <uuid>' in the conversation.")
15
15
edit_prompt: str=Field(..., description="Natural language description of the change to make. Be specific about what to change and how. E.g., 'Remove the filter bar', 'Make the revenue chart blue', 'Add a KPI card for total users'. Also use this to fix visual issues from a previous create_artifact (e.g., 'the bar chart is cut off on the right side', 'KPI cards are overlapping'). If adding new visualizations, describe where they should go in the layout.")
16
-
visualization_ids: Optional[List[str]] =Field(default=None, description="Optional list of NEW visualization IDs to add to the artifact (from create_data results). Existing visualization IDs are kept automatically. Provide this when the edit adds a new chart or data source that wasn't in the original artifact.")
16
+
visualization_ids: Optional[List[str]] =Field(default=None, description="List of NEW visualization IDs to include in the artifact. IMPORTANT: If you called create_data before this edit, you MUST pass the resulting visualization_id(s) here. Without them, the new visualizations will not appear in the dashboard. Existing visualization IDs from the original artifact are kept automatically — only pass new ones.")
17
17
title: Optional[str] =Field(default=None, description="Updated title for the artifact. If not provided, the existing title is kept.")
18
18
19
19
@@ -32,5 +32,6 @@ class EditArtifactOutput(BaseModel):
32
32
code: str=Field(..., description="The updated code after applying the edit")
33
33
mode: str=Field(..., description="Artifact mode: 'page' or 'slides'")
visualization_ids: List[str] =Field(default_factory=list, description="All visualization IDs included in this artifact after the edit. Use these when making further edits.")
35
36
version: int=Field(..., description="Bumped version number of the artifact")
36
37
diff_applied: bool=Field(..., description="True if the edit was applied as a surgical search/replace diff. False if the tool fell back to a full code rewrite.")
0 commit comments