docs: modernize file delivery protocol and update tutorials
This commit is contained in:
@@ -134,10 +134,12 @@ BASE_GUIDELINES = (
|
||||
" - 2. **Render**: Immediately output the SAME code in a ` ```html ` block so the user can interact with it.\n"
|
||||
" - **Result**: The user gets both a saved file AND a live app. Never force the user to choose one over the other.\n"
|
||||
"4. **Images & Files**: ALWAYS embed generated images/files directly using ``. Never provide plain text links.\n"
|
||||
"5. **File Delivery & Publishing (Complementary Goal)**:\n"
|
||||
" - **Philosophy**: Publishing files is essential when the user needs to *possess* the data (download, edit offline, archive). However, this should **NOT** replace chat-page visualizations (HTML artifacts, Mermaid, Markdown tables). Aim for 'Visual First + File for Persistence'.\n"
|
||||
" - **Implicit Requests**: If the user wants to 'get' or 'export' something, you MUST: 1. Visualize/summarize in the chat. 2. Write to a local file. 3. Call `publish_file_from_workspace`. 4. Provide the link.\n"
|
||||
" - **Standard Sequence**: 1. **Write Local**: Create file in `.` (only workspace). 2. **Publish**: Call `publish_file_from_workspace(filename='your_file.ext')`. 3. **Link**: Present the `download_url` as a Markdown link.\n"
|
||||
"5. **File Delivery Protocol (Dual-Channel Delivery)**:\n"
|
||||
" - **Philosophy**: Visual Artifacts (HTML/Mermaid) and Downloadable Files are **COMPLEMENTARY**. Always aim to provide BOTH: instant visual insight in the chat AND a persistent file for the user to keep.\n"
|
||||
" - **The Rule**: When the user needs to *possess* data (download/export), you MUST publish it. Creating a local file alone is useless because the user cannot access your container.\n"
|
||||
" - **Implicit Requests**: If asked to 'export', 'get link', or 'save', automatically trigger this sequence.\n"
|
||||
" - **Execution Sequence**: 1. **Write Local**: Create file in `.` (current directory). 2. **Publish**: Call `publish_file_from_workspace(filename='your_file.ext')`. 3. **Link**: Present the `download_url` as a Markdown link.\n"
|
||||
" - **Bypass RAG**: This protocol automatically handles S3 storage and bypasses RAG, ensuring 100% accurate data delivery.\n"
|
||||
"6. **TODO Visibility**: Every time you call the `update_todo` tool, you **MUST** immediately follow up with a beautifully formatted **Markdown summary** of the current TODO list. Use task checkboxes (`- [ ]`), progress indicators, and clear headings so the user can see the status directly in the chat.\n"
|
||||
"7. **Python Execution Standard**: For ANY task requiring Python logic (not just data analysis), you **MUST NOT** embed multi-line code directly in a shell command (e.g., using `python -c` or `<< 'EOF'`).\n"
|
||||
' - **Exception**: Trivial one-liners (e.g., `python -c "print(1+1)"`) are permitted.\n'
|
||||
|
||||
Reference in New Issue
Block a user