zerochat 7.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. zerochat-7.3.0.dist-info/METADATA +70 -0
  2. zerochat-7.3.0.dist-info/RECORD +130 -0
  3. zerochat-7.3.0.dist-info/WHEEL +5 -0
  4. zerochat-7.3.0.dist-info/entry_points.txt +2 -0
  5. zerochat-7.3.0.dist-info/licenses/LICENSE +34 -0
  6. zerochat-7.3.0.dist-info/top_level.txt +2 -0
  7. zerochat.py +2004 -0
  8. zerochat_runtime/__init__.py +1 -0
  9. zerochat_runtime/assets/css/base.css +199 -0
  10. zerochat_runtime/assets/css/components/composer.css +1258 -0
  11. zerochat_runtime/assets/css/components/debug.css +777 -0
  12. zerochat_runtime/assets/css/components/header.css +97 -0
  13. zerochat_runtime/assets/css/components/icons.css +39 -0
  14. zerochat_runtime/assets/css/components/markdown.css +685 -0
  15. zerochat_runtime/assets/css/components/messages.css +473 -0
  16. zerochat_runtime/assets/css/components/modals.css +1319 -0
  17. zerochat_runtime/assets/css/components/sidebar.css +622 -0
  18. zerochat_runtime/assets/css/components/tools.css +1223 -0
  19. zerochat_runtime/assets/css/layout.css +171 -0
  20. zerochat_runtime/assets/css/print.css +120 -0
  21. zerochat_runtime/assets/css/styles.css +18 -0
  22. zerochat_runtime/assets/css/theme-overrides.css +555 -0
  23. zerochat_runtime/assets/css/tokens.css +165 -0
  24. zerochat_runtime/assets/help/architecture.html +247 -0
  25. zerochat_runtime/assets/help/composer.html +134 -0
  26. zerochat_runtime/assets/help/conversations.html +105 -0
  27. zerochat_runtime/assets/help/debug.html +108 -0
  28. zerochat_runtime/assets/help/en/architecture.html +247 -0
  29. zerochat_runtime/assets/help/en/composer.html +134 -0
  30. zerochat_runtime/assets/help/en/conversations.html +104 -0
  31. zerochat_runtime/assets/help/en/debug.html +105 -0
  32. zerochat_runtime/assets/help/en/gemini-free.html +39 -0
  33. zerochat_runtime/assets/help/en/index.html +191 -0
  34. zerochat_runtime/assets/help/en/learning.html +71 -0
  35. zerochat_runtime/assets/help/en/mcp.html +143 -0
  36. zerochat_runtime/assets/help/en/openrouter-free.html +39 -0
  37. zerochat_runtime/assets/help/en/profiles.html +173 -0
  38. zerochat_runtime/assets/help/en/rag.html +130 -0
  39. zerochat_runtime/assets/help/en/reasoning-telemetry.html +108 -0
  40. zerochat_runtime/assets/help/en/tools-agent.html +133 -0
  41. zerochat_runtime/assets/help/en/webllm.html +355 -0
  42. zerochat_runtime/assets/help/gemini-free.html +39 -0
  43. zerochat_runtime/assets/help/help.css +604 -0
  44. zerochat_runtime/assets/help/help.js +51 -0
  45. zerochat_runtime/assets/help/index.html +194 -0
  46. zerochat_runtime/assets/help/learning.html +71 -0
  47. zerochat_runtime/assets/help/mcp.html +143 -0
  48. zerochat_runtime/assets/help/openrouter-free.html +39 -0
  49. zerochat_runtime/assets/help/profiles.html +174 -0
  50. zerochat_runtime/assets/help/rag.html +130 -0
  51. zerochat_runtime/assets/help/reasoning-telemetry.html +111 -0
  52. zerochat_runtime/assets/help/tools-agent.html +133 -0
  53. zerochat_runtime/assets/help/webllm.html +359 -0
  54. zerochat_runtime/assets/js/agent-core.js +1553 -0
  55. zerochat_runtime/assets/js/api.js +844 -0
  56. zerochat_runtime/assets/js/app.js +2558 -0
  57. zerochat_runtime/assets/js/attachments.js +220 -0
  58. zerochat_runtime/assets/js/charts.js +338 -0
  59. zerochat_runtime/assets/js/chat-engine.js +566 -0
  60. zerochat_runtime/assets/js/config-store.js +207 -0
  61. zerochat_runtime/assets/js/context-manager.js +584 -0
  62. zerochat_runtime/assets/js/conversation-service.js +484 -0
  63. zerochat_runtime/assets/js/cookies.js +688 -0
  64. zerochat_runtime/assets/js/data-reset-service.js +136 -0
  65. zerochat_runtime/assets/js/debug.js +508 -0
  66. zerochat_runtime/assets/js/defaults.js +16 -0
  67. zerochat_runtime/assets/js/export.js +179 -0
  68. zerochat_runtime/assets/js/file-parser.js +2088 -0
  69. zerochat_runtime/assets/js/generation-controller.js +417 -0
  70. zerochat_runtime/assets/js/i18n.js +1483 -0
  71. zerochat_runtime/assets/js/icons.js +156 -0
  72. zerochat_runtime/assets/js/ingestionEngine.js +436 -0
  73. zerochat_runtime/assets/js/markdown.js +588 -0
  74. zerochat_runtime/assets/js/mcp.js +1271 -0
  75. zerochat_runtime/assets/js/message-turns.js +62 -0
  76. zerochat_runtime/assets/js/profile-backup.js +118 -0
  77. zerochat_runtime/assets/js/profile-export-bundle.js +481 -0
  78. zerochat_runtime/assets/js/profile-repository.js +213 -0
  79. zerochat_runtime/assets/js/providers-webllm.js +486 -0
  80. zerochat_runtime/assets/js/providers.js +1560 -0
  81. zerochat_runtime/assets/js/rag-index.js +295 -0
  82. zerochat_runtime/assets/js/rag-service.js +530 -0
  83. zerochat_runtime/assets/js/rag-ui.js +997 -0
  84. zerochat_runtime/assets/js/ragStorage.js +676 -0
  85. zerochat_runtime/assets/js/sandbox.js +449 -0
  86. zerochat_runtime/assets/js/state.js +704 -0
  87. zerochat_runtime/assets/js/storage-db.js +144 -0
  88. zerochat_runtime/assets/js/tool-cards.js +330 -0
  89. zerochat_runtime/assets/js/tool-security.js +653 -0
  90. zerochat_runtime/assets/js/tools/README.md +50 -0
  91. zerochat_runtime/assets/js/tools/builtin/agent-checkpoint.tool.js +212 -0
  92. zerochat_runtime/assets/js/tools/builtin/download-pdf.tool.js +111 -0
  93. zerochat_runtime/assets/js/tools/builtin/execute-javascript.tool.js +219 -0
  94. zerochat_runtime/assets/js/tools/builtin/fetch-web-page.tool.js +112 -0
  95. zerochat_runtime/assets/js/tools/builtin/list-documents.tool.js +117 -0
  96. zerochat_runtime/assets/js/tools/builtin/read-knowledge-chunk.tool.js +129 -0
  97. zerochat_runtime/assets/js/tools/builtin/read-knowledge-image.tool.js +95 -0
  98. zerochat_runtime/assets/js/tools/builtin/render-chart.tool.js +90 -0
  99. zerochat_runtime/assets/js/tools/builtin/search-knowledge-base.tool.js +124 -0
  100. zerochat_runtime/assets/js/tools/builtin/search-web.tool.js +125 -0
  101. zerochat_runtime/assets/js/tools/tool-manifest.js +53 -0
  102. zerochat_runtime/assets/js/tools/tool-runtime.js +77 -0
  103. zerochat_runtime/assets/js/ui-composer.js +319 -0
  104. zerochat_runtime/assets/js/ui-conversation.js +655 -0
  105. zerochat_runtime/assets/js/ui-dialogs.js +132 -0
  106. zerochat_runtime/assets/js/ui-generation-status.js +119 -0
  107. zerochat_runtime/assets/js/ui-inspector.js +804 -0
  108. zerochat_runtime/assets/js/ui-mcp.js +604 -0
  109. zerochat_runtime/assets/js/ui-profiles.js +824 -0
  110. zerochat_runtime/assets/js/ui-reasoning.js +146 -0
  111. zerochat_runtime/assets/js/ui-settings.js +825 -0
  112. zerochat_runtime/assets/js/ui-shell.js +215 -0
  113. zerochat_runtime/assets/js/ui-sidebar.js +429 -0
  114. zerochat_runtime/assets/js/ui-telemetry.js +404 -0
  115. zerochat_runtime/assets/js/ui-transfer.js +262 -0
  116. zerochat_runtime/assets/js/utils.js +216 -0
  117. zerochat_runtime/assets/js/vendor/orama.browser.js +11 -0
  118. zerochat_runtime/assets/js/web-browser.js +569 -0
  119. zerochat_runtime/assets/js/web-search.js +519 -0
  120. zerochat_runtime/assets/manifest.webmanifest +20 -0
  121. zerochat_runtime/assets/services/dummy_mcp/dummy_mcp_server.py +47 -0
  122. zerochat_runtime/assets/services/dummy_mcp/service.json +22 -0
  123. zerochat_runtime/assets/services/lsp/installer.json +9 -0
  124. zerochat_runtime/assets/services/lsp/service.json +22 -0
  125. zerochat_runtime/assets/services/memory/installer.json +9 -0
  126. zerochat_runtime/assets/services/memory/service.json +24 -0
  127. zerochat_runtime/assets/services/playwright/installer.json +10 -0
  128. zerochat_runtime/assets/services/playwright/service.json +39 -0
  129. zerochat_runtime/assets/sw.js +164 -0
  130. zerochat_runtime/assets/zerochat.html +671 -0
@@ -0,0 +1,130 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Local Knowledge Base (RAG) · ZeroChat Help</title>
7
+ <meta name="description" content="Guide for local Retrieval-Augmented Generation (RAG) in ZeroChat: knowledge branches, document ingestion, Orama search, and image analysis.">
8
+ <link rel="stylesheet" href="../help.css">
9
+ </head>
10
+ <body>
11
+ <div class="container">
12
+ <header>
13
+ <div class="header-top">
14
+ <a href="index.html" class="logo-badge">
15
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 17l6-6-6-6M12 19h8"/></svg>
16
+ ZeroChat Docs
17
+ </a>
18
+ <div class="header-actions">
19
+ <a href="../rag.html" class="top-nav-link">Español 🌐</a>
20
+ <a href="index.html" class="top-nav-link">← Back to Index</a>
21
+ </div>
22
+ </div>
23
+ <h1>Local Knowledge Base (RAG)</h1>
24
+ <p class="subtitle">Query your own documents privately without uploading them to the cloud using the built-in browser RAG engine.</p>
25
+ </header>
26
+
27
+ <div class="card">
28
+ <h2>1. What is RAG and Why ZeroChat is Unique?</h2>
29
+ <p>
30
+ <strong>RAG</strong> (<em>Retrieval-Augmented Generation</em>) is a method that allows language models to ground their answers in your personal documents, manuals, codebases, or technical notes.
31
+ </p>
32
+ <p>
33
+ While typical SaaS tools require uploading sensitive files to remote servers, ZeroChat executes <strong>all document ingestion, chunking, and search indexing locally inside your browser</strong> using the <strong>Orama</strong> search engine backed by <strong>IndexedDB</strong>.
34
+ </p>
35
+ <div class="alert alert-success">
36
+ <strong>Absolute confidentiality:</strong> Your proprietary source code, internal agreements, or confidential records never leave your machine. Only the specific retrieved chunks relevant to answering your question are passed to your chosen model.
37
+ </div>
38
+ </div>
39
+
40
+ <div class="card">
41
+ <h2>2. Knowledge Branches</h2>
42
+ <p>
43
+ To keep distinct projects cleanly separated, ZeroChat organizes knowledge into independent <strong>Branches</strong>:
44
+ </p>
45
+ <ul>
46
+ <li>Create topic-specific branches (e.g., <em>"API Specs"</em>, <em>"Financial Reports"</em>, <em>"Research Papers"</em>).</li>
47
+ <li>Activate multiple branches from the <strong>RAG</strong> button in the composer toolbar. To create branches, upload, or manage documents, open <strong>RAG</strong> from the general settings menu.</li>
48
+ <li>When combining branches in different languages, ZeroChat shows a notice without changing active branches.</li>
49
+ <li>When a branch is active, the chat engine and agents gain direct retrieval access to its documents.</li>
50
+ </ul>
51
+ </div>
52
+
53
+ <div class="card">
54
+ <h2>3. Document Ingestion & Chunking</h2>
55
+ <p>
56
+ Open RAG from the general settings menu, then drop files into its management panel or select them from disk:
57
+ </p>
58
+ <ul>
59
+ <li><strong>PDFs & Books:</strong> Parses text per page and captures embedded figures and diagrams.</li>
60
+ <li><strong>Markdown & Plain Text:</strong> Respects heading structures (<code>#</code>, <code>##</code>) for semantic boundary division.</li>
61
+ <li><strong>Source Code Files:</strong> Groups code blocks respecting function and class scopes so technical context is preserved.</li>
62
+ <li><strong>Intelligent Chunking:</strong> Divides content into optimal token windows with configured overlap to ensure complete contextual coherence.</li>
63
+ <li><strong>Duplicate Detection:</strong> When uploading a file with the same name and path as an existing document in the branch, ZeroChat prompts you to either <em>Replace</em> the previous document or <em>Ignore</em> the duplicate. You can check the box to apply this decision to all remaining duplicates in the batch.</li>
64
+ <li><strong>Cooperative Cancellation:</strong> During long or multi-file ingestions, you can click the <em>Stop</em> button to halt the process cleanly at any point without corrupting the index or previously saved documents.</li>
65
+ </ul>
66
+ </div>
67
+
68
+ <div class="card">
69
+ <h2>4. Retrieval Strategies & Agent Tools</h2>
70
+ <p>
71
+ The model queries active documents through RAG tools:
72
+ </p>
73
+ <ol>
74
+ <li>
75
+ <strong>Active Agent Tool Calling:</strong> The model dynamically queries the database using specialized tools:
76
+ <ul>
77
+ <li><code>list_documents</code>: Discovers available documents in the branch.</li>
78
+ <li><code>search_knowledge_base</code>: Searches for specific terms and semantic matches.</li>
79
+ <li><code>read_knowledge_chunk</code>: Reads a specific section in high resolution.</li>
80
+ <li><code>read_knowledge_image</code>: Inspects embedded figures or chart images visually.</li>
81
+ </ul>
82
+ </li>
83
+ </ol>
84
+ </div>
85
+
86
+ <div class="card">
87
+ <h2>5. Configuration & Recommendations</h2>
88
+
89
+ <h3>IndexedDB + Orama</h3>
90
+ <p>
91
+ Files, metadata, and chunks are stored in IndexedDB. Orama builds an in-memory search index for the active branch.
92
+ </p>
93
+
94
+ <h3>No permissions or ingestion costs</h3>
95
+ <p>
96
+ Selecting a file only grants read access to that specific upload. No folder permissions are requested, and no LLM calls are made to summarize or index documents.
97
+ </p>
98
+
99
+ <h3>Configuring the model for document queries</h3>
100
+ <p>
101
+ For factual queries over documents, use a low temperature (0 to 0.2): this reduces variation and increases the likelihood that the model sticks to retrieved passages. Higher temperatures (0.7+) are better suited for creative writing tasks, not for extracting numbers or facts. The model must also support tool calling; if it doesn't, it won't be able to query this knowledge base.
102
+ </p>
103
+
104
+ <h3>Agent checkpoint for low-context models</h3>
105
+ <p>
106
+ Compact models or those with limited context windows can become overwhelmed when accumulating multiple document fragments. Enable the <strong>Agent Checkpoint (agent_checkpoint)</strong> from the Reasoning menu: it allows the model to consolidate intermediate findings and maintain a clear research plan. Especially recommended for models with fewer than 14B parameters or context windows under 32k tokens.
107
+ </p>
108
+ </div>
109
+
110
+ <nav class="page-navigation" aria-label="Help navigation">
111
+ <a href="tools-agent.html" class="nav-button prev">
112
+ <span class="nav-direction">← Previous</span>
113
+ <span class="nav-title">Agent Mode & Tools</span>
114
+ </a>
115
+ <a href="index.html" class="nav-button index">
116
+ <span class="nav-direction">Index</span>
117
+ <span class="nav-title">View all topics</span>
118
+ </a>
119
+ <a href="mcp.html" class="nav-button next">
120
+ <span class="nav-direction">Next →</span>
121
+ <span class="nav-title">MCP Protocol</span>
122
+ </a>
123
+ </nav>
124
+
125
+ <footer>
126
+ <p>ZeroChat · Universal Web AI Client · User Manual</p>
127
+ </footer>
128
+ </div>
129
+ </body>
130
+ </html>
@@ -0,0 +1,108 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Reasoning (Thinking) & Context Telemetry · ZeroChat Help</title>
7
+ <meta name="description" content="Guide for reasoning models (Thinking) and real-time monitoring of tokens, context cache hits, and generation speed in ZeroChat.">
8
+ <link rel="stylesheet" href="../help.css">
9
+ </head>
10
+ <body>
11
+ <div class="container">
12
+ <header>
13
+ <div class="header-top">
14
+ <a href="index.html" class="logo-badge">
15
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 17l6-6-6-6M12 19h8"/></svg>
16
+ ZeroChat Docs
17
+ </a>
18
+ <div class="header-actions">
19
+ <a href="../reasoning-telemetry.html" class="top-nav-link">Español 🌐</a>
20
+ <a href="index.html" class="top-nav-link">← Back to Index</a>
21
+ </div>
22
+ </div>
23
+ <h1>Reasoning (Thinking) & Telemetry</h1>
24
+ <p class="subtitle">Learn how to control model deliberation effort and supervise context window consumption and token metrics in real time.</p>
25
+ </header>
26
+
27
+ <div class="card">
28
+ <h2>1. Reasoning-Capable Models</h2>
29
+ <p>
30
+ Next-generation models (such as DeepSeek-R1, OpenAI o1/o3-mini, Claude 3.7 Sonnet with thinking, and Qwen QwQ) generate internal thought chains prior to answering.
31
+ </p>
32
+ <p>
33
+ ZeroChat streams these thinking chunks in real time, rendering them inside collapsible thought blocks with timers.
34
+ </p>
35
+ <h3>The Reasoning Effort Selector</h3>
36
+ <p>
37
+ The composer toolbar includes a speedometer indicator. Its needle reflects the selected intensity; click it to open a compact panel with an intensity slider and an X close button.
38
+ </p>
39
+ <ul>
40
+ <li><strong>None:</strong> No reasoning configuration is sent; it is the right choice for fast, concise answers.</li>
41
+ <li><strong>Low to Maximum:</strong> Use the slider to adjust reasoning effort to the task's complexity.</li>
42
+ <li><strong>Compatibility:</strong> ZeroChat adapts the level to the format understood by the provider. If the model does not support reasoning, it continues with a normal response.</li>
43
+ </ul>
44
+ <div class="alert alert-info">
45
+ <strong>Agent Checkpoint (<code>agent_checkpoint</code>):</strong> Enable this tool from the reasoning menu to let models store intermediate conclusions before complex tool loops or RAG searches.
46
+ </div>
47
+ </div>
48
+
49
+ <div class="card">
50
+ <h2>2. Unified Context Hub</h2>
51
+ <p>
52
+ Next to the profile selector, the telemetry chip (e.g., <code>1.4k / 128k</code>) reflects context health via color-coded status:
53
+ </p>
54
+ <ul>
55
+ <li><strong>Green (Optimal):</strong> Under 75% of context limit used.</li>
56
+ <li><strong>Amber (Warning):</strong> Between 75% and 90% consumed; consider pruning or branching.</li>
57
+ <li><strong>Red (Critical):</strong> Over 90% capacity used; truncation risk is imminent.</li>
58
+ </ul>
59
+ </div>
60
+
61
+ <div class="card">
62
+ <h2>3. Context Hub Popover Diagnostics</h2>
63
+ <p>
64
+ Click the token pill to open the comprehensive telemetry diagnostic view:
65
+ </p>
66
+
67
+ <h3>Section 1: Global Context Window</h3>
68
+ <ul>
69
+ <li><strong>Progress Bar:</strong> Visual percentage of context window used.</li>
70
+ <li><strong>Used, Limit, and Available Tokens:</strong> Exact token metrics synthesized from server usage data and client tokenizer estimates.</li>
71
+ <li><strong>Assumed Capacity Override:</strong> Manually input custom limits (e.g., 8k or 32k) if your local server does not publish its capacity.</li>
72
+ </ul>
73
+
74
+ <h3>Section 2: Prompt Cache Savings (KV Cache)</h3>
75
+ <ul>
76
+ <li><strong>Cached Read Tokens (Savings):</strong> Tokens served from cache with reduced pricing and latency.</li>
77
+ <li><strong>Cached Write Tokens:</strong> New prefix tokens cached for subsequent turns.</li>
78
+ </ul>
79
+
80
+ <h3>Section 3: Last Turn Performance</h3>
81
+ <ul>
82
+ <li><strong>Prompt & Completion Tokens:</strong> Token breakdown for the latest message.</li>
83
+ <li><strong>Generation Speed:</strong> Measured in tokens per second (<code>t/s</code>).</li>
84
+ <li><strong>Latency (TTFT):</strong> Time to First Token in milliseconds.</li>
85
+ </ul>
86
+ </div>
87
+
88
+ <nav class="page-navigation" aria-label="Help navigation">
89
+ <a href="composer.html" class="nav-button prev">
90
+ <span class="nav-direction">← Previous</span>
91
+ <span class="nav-title">Composer & Multimedia</span>
92
+ </a>
93
+ <a href="index.html" class="nav-button index">
94
+ <span class="nav-direction">Index</span>
95
+ <span class="nav-title">View all topics</span>
96
+ </a>
97
+ <div class="nav-button disabled">
98
+ <span class="nav-direction">Last page</span>
99
+ <span class="nav-title">—</span>
100
+ </div>
101
+ </nav>
102
+
103
+ <footer>
104
+ <p>ZeroChat · Universal Web AI Client · User Manual</p>
105
+ </footer>
106
+ </div>
107
+ </body>
108
+ </html>
@@ -0,0 +1,133 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Agent Mode & Built-in Tools · ZeroChat Help</title>
7
+ <meta name="description" content="Guide for the autonomous agentic loop in ZeroChat: JavaScript execution under technical user supervision, web search, page fetching, and charts.">
8
+ <link rel="stylesheet" href="../help.css">
9
+ </head>
10
+ <body>
11
+ <div class="container">
12
+ <header>
13
+ <div class="header-top">
14
+ <a href="index.html" class="logo-badge">
15
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 17l6-6-6-6M12 19h8"/></svg>
16
+ ZeroChat Docs
17
+ </a>
18
+ <div class="header-actions">
19
+ <a href="../tools-agent.html" class="top-nav-link">Español 🌐</a>
20
+ <a href="index.html" class="top-nav-link">← Back to Index</a>
21
+ </div>
22
+ </div>
23
+ <h1>Agent Mode & Built-in Tools</h1>
24
+ <p class="subtitle">Turn passive language models into active agents capable of reasoning, running code, querying the web, and rendering graphics.</p>
25
+ </header>
26
+
27
+ <div class="card">
28
+ <h2>1. What is Agent Mode in ZeroChat?</h2>
29
+ <p>
30
+ <strong>Agent Mode</strong> transforms the standard question-answer conversation into an autonomous, multi-turn reasoning loop (<em>Agentic Loop</em>).
31
+ </p>
32
+ <p>
33
+ When you submit a complex task, the model determines which tools it needs, issues structured function calls, ZeroChat runs the tool in your browser, and feeds the result back to the model until the goal is accomplished.
34
+ </p>
35
+ <div class="alert alert-info">
36
+ <strong>Max Turn Safety Limit (<code>maxAgentTurns</code>):</strong> In Settings, choose the maximum consecutive agent turns from 5 to 35 (15 by default) to limit loops and token use.
37
+ </div>
38
+ </div>
39
+
40
+ <div class="card">
41
+ <h2>2. Built-in Tools Catalog</h2>
42
+ <div class="table-responsive">
43
+ <table>
44
+ <thead>
45
+ <tr>
46
+ <th>Tool Name</th>
47
+ <th>Description & Capabilities</th>
48
+ <th>Runtime Environment</th>
49
+ </tr>
50
+ </thead>
51
+ <tbody>
52
+ <tr>
53
+ <td><code>execute_javascript</code></td>
54
+ <td>Runs local JavaScript for calculations, algorithmic logic, data restructuring, or string parsing under technical user supervision.</td>
55
+ <td>Local Web Worker with execution limits</td>
56
+ </tr>
57
+ <tr>
58
+ <td><code>search_web</code></td>
59
+ <td>Searches the live internet for recent news, technical documentation, or real-time data.</td>
60
+ <td>SearXNG or DuckDuckGo with zero API keys</td>
61
+ </tr>
62
+ <tr>
63
+ <td><code>fetch_web_page</code></td>
64
+ <td>Downloads a web page URL and converts it into clean, readable Markdown stripping ads and boilerplate.</td>
65
+ <td>HTTP client with anti-SSRF protections</td>
66
+ </tr>
67
+ <tr>
68
+ <td><code>download_pdf</code></td>
69
+ <td>Downloads PDF documents from URLs and extracts their textual content for LLM inspection.</td>
70
+ <td>In-browser client PDF parser</td>
71
+ </tr>
72
+ <tr>
73
+ <td><code>render_chart</code></td>
74
+ <td>Generates interactive native SVG charts (line, bar, scatter, etc.) rendered inline within the chat stream.</td>
75
+ <td>Client SVG renderer (<code>charts.js</code>)</td>
76
+ </tr>
77
+ <tr>
78
+ <td><code>list_documents</code><br><code>search_knowledge_base</code><br><code>read_knowledge_chunk</code><br><code>read_knowledge_image</code></td>
79
+ <td>Inspects, searches, and reads document chunks from your local RAG knowledge branches.</td>
80
+ <td>Orama & IndexedDB client engine</td>
81
+ </tr>
82
+ </tbody>
83
+ </table>
84
+ </div>
85
+ <p><code>agent_checkpoint</code> lets the agent summarize findings and decide whether to continue researching or respond.</p>
86
+ </div>
87
+
88
+ <div class="card">
89
+ <h2>3. JavaScript Execution Under Technical Supervision</h2>
90
+ <p>
91
+ <code>execute_javascript</code> is a supporting tool for calculations, data processing, and algorithms. It is intended for use with the awareness and active supervision of a technical user, who can enable or disable it in Settings.
92
+ </p>
93
+ <ul>
94
+ <li><strong>Web Worker execution:</strong> It normally runs in a separate thread to keep the interface responsive during calculations or heavier algorithms.</li>
95
+ <li><strong>Time limit:</strong> If a script exceeds the configured time, ZeroChat stops the Worker.</li>
96
+ <li><strong>Output limits:</strong> Excessive results are truncated and console messages are limited to preserve responsiveness.</li>
97
+ <li><strong>Restricted APIs for calculations:</strong> The Worker neutralizes network and sub-worker APIs that are unnecessary for this tool.</li>
98
+ </ul>
99
+ </div>
100
+
101
+ <div class="card">
102
+ <h2>4. Interactive Tool Cards</h2>
103
+ <p>
104
+ When an agent calls a tool, ZeroChat renders a dedicated <strong>Tool Card</strong> directly in the chat message flow:
105
+ </p>
106
+ <ul>
107
+ <li><strong>Live status indicator:</strong> Displays an animated spinner while processing and a green checkmark or error alert upon completion.</li>
108
+ <li><strong>Collapsible input & output:</strong> Expand the card to inspect the exact arguments passed to the function and the data returned.</li>
109
+ <li><strong>Full session persistence:</strong> Tool cards and their expanded/collapsed state are preserved across session reloads.</li>
110
+ </ul>
111
+ </div>
112
+
113
+ <nav class="page-navigation" aria-label="Help navigation">
114
+ <a href="webllm.html" class="nav-button prev">
115
+ <span class="nav-direction">← Previous</span>
116
+ <span class="nav-title">Local WebLLM Inference</span>
117
+ </a>
118
+ <a href="index.html" class="nav-button index">
119
+ <span class="nav-direction">Index</span>
120
+ <span class="nav-title">View all topics</span>
121
+ </a>
122
+ <a href="rag.html" class="nav-button next">
123
+ <span class="nav-direction">Next →</span>
124
+ <span class="nav-title">Local Knowledge (RAG)</span>
125
+ </a>
126
+ </nav>
127
+
128
+ <footer>
129
+ <p>ZeroChat · Universal Web AI Client · User Manual</p>
130
+ </footer>
131
+ </div>
132
+ </body>
133
+ </html>