clew-code 0.2.7 → 0.2.9

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 (57) hide show
  1. package/README.md +292 -299
  2. package/dist/main.js +2745 -2869
  3. package/docs/architecture.html +148 -145
  4. package/docs/architecture.th.html +79 -78
  5. package/docs/clew-code-architecture.html +1125 -0
  6. package/docs/commands.html +224 -223
  7. package/docs/commands.th.html +131 -130
  8. package/docs/configuration.html +147 -145
  9. package/docs/configuration.th.html +108 -106
  10. package/docs/css/styles.css +48 -42
  11. package/docs/daemon.html +129 -128
  12. package/docs/daemon.th.html +73 -72
  13. package/docs/features/bridge-mode.html +99 -98
  14. package/docs/features/bridge-mode.th.html +90 -89
  15. package/docs/features/evals.html +182 -181
  16. package/docs/features/evals.th.html +90 -89
  17. package/docs/features/peer.html +178 -177
  18. package/docs/features/searxng-search.html +151 -150
  19. package/docs/features/searxng-search.th.html +95 -94
  20. package/docs/features/sentry-setup.html +157 -156
  21. package/docs/features/sentry-setup.th.html +97 -96
  22. package/docs/index.html +299 -298
  23. package/docs/index.th.html +292 -290
  24. package/docs/installation.html +105 -103
  25. package/docs/installation.th.html +105 -103
  26. package/docs/internals/growthbook-ab-testing.html +113 -112
  27. package/docs/internals/growthbook-ab-testing.th.html +81 -80
  28. package/docs/internals/hidden-features.html +149 -147
  29. package/docs/internals/hidden-features.th.html +109 -107
  30. package/docs/js/main.js +83 -3
  31. package/docs/loop.html +181 -180
  32. package/docs/loop.th.html +227 -226
  33. package/docs/mcp.html +247 -246
  34. package/docs/mcp.th.html +207 -206
  35. package/docs/models.html +111 -110
  36. package/docs/models.th.html +61 -60
  37. package/docs/peer.html +236 -235
  38. package/docs/peer.th.html +280 -279
  39. package/docs/permission-model.html +102 -101
  40. package/docs/permission-model.th.html +67 -66
  41. package/docs/plugins.html +102 -101
  42. package/docs/plugins.th.html +79 -78
  43. package/docs/providers.html +126 -117
  44. package/docs/providers.th.html +80 -78
  45. package/docs/quick-start.html +93 -92
  46. package/docs/quick-start.th.html +40 -39
  47. package/docs/research-memory.html +82 -79
  48. package/docs/research-memory.th.html +72 -71
  49. package/docs/skills.html +117 -116
  50. package/docs/skills.th.html +90 -89
  51. package/docs/tools.html +170 -169
  52. package/docs/tools.th.html +84 -83
  53. package/docs/troubleshooting.html +106 -105
  54. package/docs/troubleshooting.th.html +85 -84
  55. package/package.json +164 -162
  56. package/docs/taste.html +0 -436
  57. package/docs/taste.th.html +0 -236
@@ -1,83 +1,84 @@
1
- <!DOCTYPE html>
2
- <html lang="th">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>เครื่องมือ Clew</title>
7
- <meta name="description" content="ข้อมูลอ้างอิงเครื่องมือในตัวของ Clew การดำเนินการไฟล์, เชลล์, ค้นหา, เอเจนต์, MCP, และระบบอัตโนมัติ">
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap" rel="stylesheet">
11
- <link rel="stylesheet" href="css/styles.css">
12
- <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
- </head>
14
- <body>
15
- <header class="header"></header>
16
- <div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
17
- <div class="content-wrap"><main class="content">
18
- <div class="breadcrumbs"><a href="index.th.html">หน้าแรก</a><span class="sep">/</span><span>เครื่องมือ</span></div>
19
- <h1>เครื่องมือ</h1>
20
- <p class="section-subtitle">Clew มีเครื่องมือในตัว 50+ รายการ พร้อมเครื่องมือ MCP ที่โหลดแบบไดนามิก เครื่องมือถูกเรียกโดยโมเดล AI ผ่านบล็อก <code>tool_use</code></p>
21
-
22
- <h2>วิธีการทำงานของเครื่องมือ</h2>
23
- <p>เครื่องมือถูกกำหนดด้วย Zod schemas ใน <code>src/Tool.ts</code> ผ่านตัวช่วย <code>buildTool()</code> และลงทะเบียนใน <code>src/tools.ts</code></p>
24
-
25
- <pre><code>โมเดลส่ง tool_use
26
- ปรับมาตรฐานการเรียกใช้เครื่องมือ (toolCallParser.ts)
27
- ตรวจสอบสิทธิ์ (permissions.ts)
28
- ฮุค PreToolUse (ปลั๊กอิน)
29
- ดำเนินการเครื่องมือ (StreamingToolExecutor)
30
- ฮุค PostToolUse (ปลั๊กอิน)
31
- ส่งคืนผลลัพธ์เป็น tool_result
32
- วนซ้ำคำถามต่อไป</code></pre>
33
-
34
- <h2>การดำเนินการไฟล์และโค้ด</h2>
35
- <table>
36
- <tr><th>เครื่องมือ</th><th>คำอธิบาย</th></tr>
37
- <tr><td><code>Read</code></td><td>อ่านไฟล์พร้อมหมายเลขบรรทัด, รองรับรูปภาพ, PDF, Jupyter notebooks</td></tr>
38
- <tr><td><code>Write</code></td><td>สร้างไฟล์ใหม่พร้อมเนื้อหาเต็ม</td></tr>
39
- <tr><td><code>Edit</code></td><td>แก้ไขแบบแทนที่สตริงที่แน่นอน</td></tr>
40
- <tr><td><code>Glob</code></td><td>ค้นหาไฟล์ด้วย pattern, เรียงตามเวลาแก้ไข</td></tr>
41
- <tr><td><code>Grep</code></td><td>ค้นหาเนื้อหาด้วย regex พร้อมบรรทัดบริบท</td></tr>
42
- <tr><td><code>NotebookEdit</code></td><td>แก้ไขเซลล์ Jupyter notebook</td></tr>
43
- </table>
44
-
45
- <h2>เชลล์และระบบ</h2>
46
- <table>
47
- <tr><th>เครื่องมือ</th><th>คำอธิบาย</th></tr>
48
- <tr><td><code>Bash</code></td><td>รันคำสั่ง shell พร้อม timeout, background, sandbox</td></tr>
49
- <tr><td><code>Monitor</code></td><td>สตรีม stdout/stderr จากงานพื้นหลังแบบเรียลไทม์</td></tr>
50
- <tr><td><code>TaskOutput</code></td><td>รับผลลัพธ์จากงานที่กำลังรันหรือเสร็จแล้ว</td></tr>
51
- </table>
52
-
53
- <h2>ค้นหาและเว็บ</h2>
54
- <table>
55
- <tr><th>เครื่องมือ</th><th>คำอธิบาย</th></tr>
56
- <tr><td><code>WebSearch</code></td><td>ค้นหาเว็บหลายผู้ให้บริการ (Tavily, Brave, Serper, SearXNG, DuckDuckGo)</td></tr>
57
- <tr><td><code>WebFetch</code></td><td>ดึงและวิเคราะห์เนื้อหาจาก URL</td></tr>
58
- <tr><td><code>SessionSearch</code></td><td>ค้นหาข้อความเต็มในประวัติเซสชันที่ผ่านมา</td></tr>
59
- </table>
60
-
61
- <h2>ความปลอดภัยและสิทธิ์ของเครื่องมือ</h2>
62
- <p>แต่ละเครื่องมือประกาศ:</p>
63
- <ul>
64
- <li><strong>isEnabled()</strong> พร้อมใช้งานใน build ปัจจุบันหรือไม่</li>
65
- <li><strong>isConcurrencySafe()</strong> รันพร้อมกับเครื่องมืออื่นได้หรือไม่</li>
66
- <li><strong>isReadOnly()</strong> ไม่แก้ไขระบบไฟล์</li>
67
- <li><strong>isDestructive()</strong> ดำเนินการที่ไม่สามารถย้อนกลับ</li>
68
- </ul>
69
-
70
- <footer class="footer">
71
- <span>Clew Code v0.2.4 โอเพนซอร์ส</span>
72
- <div class="footer-links">
73
- <a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
74
- <a href="https://github.com/JonusNattapong/ClewCode/issues">ปัญหา</a>
75
- </div>
76
- </footer>
77
- </main>
78
- <nav class="toc-sidebar"></nav>
79
- </div>
80
- </div>
81
- <script src="js/main.js"></script>
82
- </body>
83
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="th">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>เครื่องมือ — Clew</title>
7
+ <meta name="description" content="ข้อมูลอ้างอิงเครื่องมือในตัวของ Clew — การดำเนินการไฟล์, เชลล์, ค้นหา, เอเจนต์, MCP, และระบบอัตโนมัติ">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap" rel="stylesheet">
11
+ <link rel="stylesheet" href="css/styles.css">
12
+ <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
+ </head>
14
+ <body>
15
+ <header class="header"></header>
16
+ <div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
17
+ <div class="content-wrap"><main class="content">
18
+ <div class="breadcrumbs"><a href="index.th.html">หน้าแรก</a><span class="sep">/</span><span>เครื่องมือ</span></div>
19
+ <h1>เครื่องมือ</h1>
20
+ <p class="section-subtitle">Clew มีเครื่องมือในตัว 50+ รายการ พร้อมเครื่องมือ MCP ที่โหลดแบบไดนามิก เครื่องมือถูกเรียกโดยโมเดล AI ผ่านบล็อก <code>tool_use</code></p>
21
+
22
+ <h2>วิธีการทำงานของเครื่องมือ</h2>
23
+ <p>เครื่องมือถูกกำหนดด้วย Zod schemas ใน <code>src/Tool.ts</code> ผ่านตัวช่วย <code>buildTool()</code> และลงทะเบียนใน <code>src/tools.ts</code></p>
24
+
25
+ <pre><code>โมเดลส่ง tool_use
26
+ ปรับมาตรฐานการเรียกใช้เครื่องมือ (toolCallParser.ts)
27
+ ตรวจสอบสิทธิ์ (permissions.ts)
28
+ ฮุค PreToolUse (ปลั๊กอิน)
29
+ ดำเนินการเครื่องมือ (StreamingToolExecutor)
30
+ ฮุค PostToolUse (ปลั๊กอิน)
31
+ ส่งคืนผลลัพธ์เป็น tool_result
32
+ วนซ้ำคำถามต่อไป</code></pre>
33
+
34
+ <h2>การดำเนินการไฟล์และโค้ด</h2>
35
+ <table>
36
+ <tr><th>เครื่องมือ</th><th>คำอธิบาย</th></tr>
37
+ <tr><td><code>Read</code></td><td>อ่านไฟล์พร้อมหมายเลขบรรทัด, รองรับรูปภาพ, PDF, Jupyter notebooks</td></tr>
38
+ <tr><td><code>Write</code></td><td>สร้างไฟล์ใหม่พร้อมเนื้อหาเต็ม</td></tr>
39
+ <tr><td><code>Edit</code></td><td>แก้ไขแบบแทนที่สตริงที่แน่นอน</td></tr>
40
+ <tr><td><code>Glob</code></td><td>ค้นหาไฟล์ด้วย pattern, เรียงตามเวลาแก้ไข</td></tr>
41
+ <tr><td><code>Grep</code></td><td>ค้นหาเนื้อหาด้วย regex พร้อมบรรทัดบริบท</td></tr>
42
+ <tr><td><code>NotebookEdit</code></td><td>แก้ไขเซลล์ Jupyter notebook</td></tr>
43
+ </table>
44
+
45
+ <h2>เชลล์และระบบ</h2>
46
+ <table>
47
+ <tr><th>เครื่องมือ</th><th>คำอธิบาย</th></tr>
48
+ <tr><td><code>Bash</code></td><td>รันคำสั่ง shell พร้อม timeout, background, sandbox</td></tr>
49
+ <tr><td><code>Monitor</code></td><td>สตรีม stdout/stderr จากงานพื้นหลังแบบเรียลไทม์</td></tr>
50
+ <tr><td><code>TaskOutput</code></td><td>รับผลลัพธ์จากงานที่กำลังรันหรือเสร็จแล้ว</td></tr>
51
+ </table>
52
+
53
+ <h2>ค้นหาและเว็บ</h2>
54
+ <table>
55
+ <tr><th>เครื่องมือ</th><th>คำอธิบาย</th></tr>
56
+ <tr><td><code>WebSearch</code></td><td>ค้นหาเว็บหลายผู้ให้บริการ (Tavily, Brave, Serper, SearXNG, DuckDuckGo)</td></tr>
57
+ <tr><td><code>WebFetch</code></td><td>ดึงและวิเคราะห์เนื้อหาจาก URL</td></tr>
58
+ <tr><td><code>SessionSearch</code></td><td>ค้นหาข้อความเต็มในประวัติเซสชันที่ผ่านมา</td></tr>
59
+ </table>
60
+
61
+ <h2>ความปลอดภัยและสิทธิ์ของเครื่องมือ</h2>
62
+ <p>แต่ละเครื่องมือประกาศ:</p>
63
+ <ul>
64
+ <li><strong>isEnabled()</strong> — พร้อมใช้งานใน build ปัจจุบันหรือไม่</li>
65
+ <li><strong>isConcurrencySafe()</strong> — รันพร้อมกับเครื่องมืออื่นได้หรือไม่</li>
66
+ <li><strong>isReadOnly()</strong> — ไม่แก้ไขระบบไฟล์</li>
67
+ <li><strong>isDestructive()</strong> — ดำเนินการที่ไม่สามารถย้อนกลับ</li>
68
+ </ul>
69
+
70
+ <footer class="footer">
71
+ <span>Clew Code v0.2.7 — โอเพนซอร์ส</span>
72
+ <div class="footer-links">
73
+ <a href="https://github.com/ClewCode/ClewCode">GitHub</a>
74
+ <a href="https://github.com/ClewCode/ClewCode/issues">ปัญหา</a>
75
+ </div>
76
+ </footer>
77
+ </main>
78
+ <nav class="toc-sidebar"></nav>
79
+ </div>
80
+ </div>
81
+ <script src="js/main.js"></script>
82
+ </body>
83
+ </html>
84
+
@@ -1,105 +1,106 @@
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>Troubleshooting Clew</title>
7
- <meta name="description" content="Common issues and solutions for Clew provider keys, build errors, MCP, plugins, and runtime problems.">
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
11
- <link rel="stylesheet" href="css/styles.css">
12
- <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
- </head>
14
- <body>
15
- <header class="header"></header>
16
- <div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
17
- <div class="content-wrap"><main class="content">
18
- <div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Troubleshooting</span></div>
19
- <h1>Troubleshooting</h1>
20
- <p class="section-subtitle">Start with <code>/doctor</code> it checks runtime version, provider credentials, config integrity, plugin/MCP status, and Sentry telemetry.</p>
21
-
22
- <h2>Startup Issues</h2>
23
- <h3>"command not found: clew"</h3>
24
- <p>npm global install path may not be in <code>PATH</code>. Use <code>npx clew-code</code> or <code>bun x clew-code</code> as alternatives.</p>
25
-
26
- <h3>"Bun not found"</h3>
27
- <p>Clew requires <a href="https://bun.sh">Bun 1.3+</a> as the runtime for the npm package.</p>
28
-
29
- <h2>Provider Issues</h2>
30
-
31
- <h3>"No API key configured"</h3>
32
- <p>Set at least one provider API key as an environment variable. See <a href="providers.html">Providers</a> for the full list.</p>
33
- <pre><code>export ANTHROPIC_API_KEY=sk-ant-...
34
- export DEEPSEEK_API_KEY=sk-...</code></pre>
35
- <p>Run <code>/doctor</code> to verify configured providers.</p>
36
-
37
- <h3>"Rate limited" or "Quota exceeded"</h3>
38
- <p>Set a fallback model via CLI: <code>--fallback-model &lt;model&gt;</code>. Or use <code>/model</code> to switch to a different provider. For rate limit options during a session, use <code>/rate-limit-options</code>.</p>
39
-
40
- <h2>Build Issues</h2>
41
-
42
- <h3>TypeScript errors during build</h3>
43
- <pre><code>bun run build
44
- # TypeScript errors may exist in uncommitted code or external modules.
45
- # Run targeted checks:
46
- bun x tsc --noEmit
47
- bun test <targeted-path></code></pre>
48
-
49
- <h3>Windows-specific issues</h3>
50
- <ul>
51
- <li>ripgrep is bundled at <code>src/utils/vendor/ripgrep/x64-win32/rg.exe</code></li>
52
- <li>TTY polyfill may be needed for Ink compatibility</li>
53
- <li>PowerShell and Bash may behave differently for tool execution</li>
54
- <li>Windows argv normalization in <code>src/entry.ts</code></li>
55
- </ul>
56
-
57
- <h2>MCP Issues</h2>
58
-
59
- <h3>"MCP server connection failed"</h3>
60
- <p>Verify the server command exists and paths are correct. Check JSON config syntax with <code>/mcp</code> command.</p>
61
-
62
- <h3>MCP tools not appearing</h3>
63
- <p>Use <code>/mcp</code> to check server status. Tools are loaded at startup via <code>--mcp-config</code> or through <code>assembleToolPool()</code> during server connection. Verify the server implements <code>tools/list</code> correctly.</p>
64
-
65
- <h2>Plugin Issues</h2>
66
-
67
- <h3>Plugin not loading</h3>
68
- <p>Check plugin manifest format and location. Use <code>/plugin</code> and <code>/reload-plugins</code> to refresh. For directory-based plugins, use <code>--plugin-dir &lt;path&gt;</code>.</p>
69
-
70
- <h2>Feature Flags</h2>
71
- <p>Some features require compile-time or runtime flags:</p>
72
- <table>
73
- <tr><th>Feature</th><th>Required Flag</th></tr>
74
- <tr><td>Bridge mode</td><td><code>BRIDGE_MODE=1</code></td></tr>
75
- <tr><td>Voice mode</td><td><code>VOICE_MODE=1</code></td></tr>
76
- <tr><td>LSP tool</td><td><code>ENABLE_LSP_TOOL=1</code></td></tr>
77
- <tr><td>Computer Use</td><td><code>ENABLE_COMPUTER_USE=1</code> (Windows)</td></tr>
78
- <tr><td>Proactive features</td><td><code>KAIROS=1</code></td></tr>
79
- <tr><td>Agent triggers</td><td><code>AGENT_TRIGGERS=1</code></td></tr>
80
- <tr><td>Code index</td><td><code>CODE_INDEX=1</code></td></tr>
81
- </table>
82
-
83
- <h2>Getting Help</h2>
84
- <ul>
85
- <li><strong>In-app diagnostics:</strong> <code>/doctor</code> comprehensive environment check</li>
86
- <li><strong>Status overview:</strong> <code>/status</code> version, model, API connectivity, tool statuses</li>
87
- <li><strong>GitHub Issues:</strong> Report bugs and feature requests</li>
88
- <li><strong>Debug mode:</strong> Run with <code>DEBUG=1</code> or <code>DEBUG=provider:anthropic</code> for detailed logging</li>
89
- </ul>
90
-
91
- <footer class="footer">
92
- <span>Clew Code v0.2.4 Open Source</span>
93
- <div class="footer-links">
94
- <a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
95
- <a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
96
- <a href="https://npmjs.com/package/clew-code">npm</a>
97
- </div>
98
- </footer>
99
- </main>
100
- <nav class="toc-sidebar"></nav>
101
- </div>
102
- </div>
103
- <script src="js/main.js"></script>
104
- </body>
105
- </html>
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>Troubleshooting — Clew</title>
7
+ <meta name="description" content="Common issues and solutions for Clew — provider keys, build errors, MCP, plugins, and runtime problems.">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
11
+ <link rel="stylesheet" href="css/styles.css">
12
+ <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
+ </head>
14
+ <body>
15
+ <header class="header"></header>
16
+ <div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
17
+ <div class="content-wrap"><main class="content">
18
+ <div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Troubleshooting</span></div>
19
+ <h1>Troubleshooting</h1>
20
+ <p class="section-subtitle">Start with <code>/doctor</code> — it checks runtime version, provider credentials, config integrity, plugin/MCP status, and Sentry telemetry.</p>
21
+
22
+ <h2>Startup Issues</h2>
23
+ <h3>"command not found: clew"</h3>
24
+ <p>npm global install path may not be in <code>PATH</code>. Use <code>npx clew-code</code> or <code>bun x clew-code</code> as alternatives.</p>
25
+
26
+ <h3>"Bun not found"</h3>
27
+ <p>Clew requires <a href="https://bun.sh">Bun 1.3+</a> as the runtime for the npm package.</p>
28
+
29
+ <h2>Provider Issues</h2>
30
+
31
+ <h3>"No API key configured"</h3>
32
+ <p>Set at least one provider API key as an environment variable. See <a href="providers.html">Providers</a> for the full list.</p>
33
+ <pre><code>export ANTHROPIC_API_KEY=sk-ant-...
34
+ export DEEPSEEK_API_KEY=sk-...</code></pre>
35
+ <p>Run <code>/doctor</code> to verify configured providers.</p>
36
+
37
+ <h3>"Rate limited" or "Quota exceeded"</h3>
38
+ <p>Set a fallback model via CLI: <code>--fallback-model &lt;model&gt;</code>. Or use <code>/model</code> to switch to a different provider. For rate limit options during a session, use <code>/rate-limit-options</code>.</p>
39
+
40
+ <h2>Build Issues</h2>
41
+
42
+ <h3>TypeScript errors during build</h3>
43
+ <pre><code>bun run build
44
+ # TypeScript errors may exist in uncommitted code or external modules.
45
+ # Run targeted checks:
46
+ bun x tsc --noEmit
47
+ bun test <targeted-path></code></pre>
48
+
49
+ <h3>Windows-specific issues</h3>
50
+ <ul>
51
+ <li>ripgrep is bundled at <code>src/utils/vendor/ripgrep/x64-win32/rg.exe</code></li>
52
+ <li>TTY polyfill may be needed for Ink compatibility</li>
53
+ <li>PowerShell and Bash may behave differently for tool execution</li>
54
+ <li>Windows argv normalization in <code>src/entry.ts</code></li>
55
+ </ul>
56
+
57
+ <h2>MCP Issues</h2>
58
+
59
+ <h3>"MCP server connection failed"</h3>
60
+ <p>Verify the server command exists and paths are correct. Check JSON config syntax with <code>/mcp</code> command.</p>
61
+
62
+ <h3>MCP tools not appearing</h3>
63
+ <p>Use <code>/mcp</code> to check server status. Tools are loaded at startup via <code>--mcp-config</code> or through <code>assembleToolPool()</code> during server connection. Verify the server implements <code>tools/list</code> correctly.</p>
64
+
65
+ <h2>Plugin Issues</h2>
66
+
67
+ <h3>Plugin not loading</h3>
68
+ <p>Check plugin manifest format and location. Use <code>/plugin</code> and <code>/reload-plugins</code> to refresh. For directory-based plugins, use <code>--plugin-dir &lt;path&gt;</code>.</p>
69
+
70
+ <h2>Feature Flags</h2>
71
+ <p>Some features require compile-time or runtime flags:</p>
72
+ <table>
73
+ <tr><th>Feature</th><th>Required Flag</th></tr>
74
+ <tr><td>Bridge mode</td><td><code>BRIDGE_MODE=1</code></td></tr>
75
+ <tr><td>Voice mode</td><td><code>VOICE_MODE=1</code></td></tr>
76
+ <tr><td>LSP tool</td><td><code>ENABLE_LSP_TOOL=1</code></td></tr>
77
+ <tr><td>Computer Use</td><td><code>ENABLE_COMPUTER_USE=1</code> (Windows)</td></tr>
78
+ <tr><td>Proactive features</td><td><code>KAIROS=1</code></td></tr>
79
+ <tr><td>Agent triggers</td><td><code>AGENT_TRIGGERS=1</code></td></tr>
80
+ <tr><td>Code index</td><td><code>CODE_INDEX=1</code></td></tr>
81
+ </table>
82
+
83
+ <h2>Getting Help</h2>
84
+ <ul>
85
+ <li><strong>In-app diagnostics:</strong> <code>/doctor</code> — comprehensive environment check</li>
86
+ <li><strong>Status overview:</strong> <code>/status</code> — version, model, API connectivity, tool statuses</li>
87
+ <li><strong>GitHub Issues:</strong> Report bugs and feature requests</li>
88
+ <li><strong>Debug mode:</strong> Run with <code>DEBUG=1</code> or <code>DEBUG=provider:anthropic</code> for detailed logging</li>
89
+ </ul>
90
+
91
+ <footer class="footer">
92
+ <span>Clew Code v0.2.7 — Open Source</span>
93
+ <div class="footer-links">
94
+ <a href="https://github.com/ClewCode/ClewCode">GitHub</a>
95
+ <a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
96
+ <a href="https://npmjs.com/package/clew-code">npm</a>
97
+ </div>
98
+ </footer>
99
+ </main>
100
+ <nav class="toc-sidebar"></nav>
101
+ </div>
102
+ </div>
103
+ <script src="js/main.js"></script>
104
+ </body>
105
+ </html>
106
+
@@ -1,84 +1,85 @@
1
- <!DOCTYPE html>
2
- <html lang="th">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>การแก้ปัญหา Clew</title>
7
- <meta name="description" content="ปัญหาทั่วไปและวิธีแก้ไขสำหรับ Clew คีย์ผู้ให้บริการ, ข้อผิดพลาด build, MCP, ปลั๊กอิน, และปัญหารันไทม์">
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap" rel="stylesheet">
11
- <link rel="stylesheet" href="css/styles.css">
12
- <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
- </head>
14
- <body>
15
- <header class="header"></header>
16
- <div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
17
- <div class="content-wrap"><main class="content">
18
- <div class="breadcrumbs"><a href="index.th.html">หน้าแรก</a><span class="sep">/</span><span>การแก้ปัญหา</span></div>
19
- <h1>การแก้ปัญหา</h1>
20
- <p class="section-subtitle">เริ่มต้นด้วย <code>/doctor</code> มันตรวจสอบเวอร์ชันรันไทม์, ข้อมูลประจำตัวผู้ให้บริการ, ความสมบูรณ์ของการตั้งค่า, สถานะปลั๊กอิน/MCP, และ Sentry telemetry</p>
21
-
22
- <h2>ปัญหาเริ่มต้น</h2>
23
- <h3>"command not found: clew"</h3>
24
- <p>พาธติดตั้ง global npm อาจไม่อยู่ใน <code>PATH</code> ใช้ <code>npx clew-code</code> หรือ <code>bun x clew-code</code> เป็นทางเลือก</p>
25
-
26
- <h3>"Bun not found"</h3>
27
- <p>Clew ต้องใช้ <a href="https://bun.sh">Bun 1.3+</a> เป็นรันไทม์สำหรับแพ็กเกจ npm</p>
28
-
29
- <h2>ปัญหาผู้ให้บริการ</h2>
30
- <h3>"No API key configured"</h3>
31
- <p>ตั้งค่าคีย์ API อย่างน้อยหนึ่งรายการเป็นตัวแปรสภาพแวดล้อม ดู <a href="providers.th.html">ผู้ให้บริการ</a> สำหรับรายการทั้งหมด</p>
32
- <pre><code>export ANTHROPIC_API_KEY=sk-ant-...
33
- export DEEPSEEK_API_KEY=sk-...</code></pre>
34
- <p>รัน <code>/doctor</code> เพื่อตรวจสอบผู้ให้บริการที่ตั้งค่า</p>
35
-
36
- <h3>"Rate limited" หรือ "Quota exceeded"</h3>
37
- <p>ตั้งค่าโมเดลสำรองผ่าน CLI: <code>--fallback-model &lt;model&gt;</code> หรือใช้ <code>/model</code> เพื่อสลับไปยังผู้ให้บริการอื่น</p>
38
-
39
- <h2>ปัญหา Build</h2>
40
- <h3>ข้อผิดพลาด TypeScript ระหว่าง build</h3>
41
- <pre><code>bun run build
42
- # ข้อผิดพลาด TypeScript อาจอยู่ในโค้ดที่ยังไม่ได้ commit หรือโมดูลภายนอก
43
- # รันการตรวจสอบเป้าหมาย:
44
- bun x tsc --noEmit
45
- bun test <targeted-path></code></pre>
46
-
47
- <h3>ปัญหาเฉพาะ Windows</h3>
48
- <ul>
49
- <li>ripgrep แถมมาที่ <code>src/utils/vendor/ripgrep/x64-win32/rg.exe</code></li>
50
- <li>TTY polyfill อาจจำเป็นสำหรับ Ink compatibility</li>
51
- <li>PowerShell และ Bash อาจทำงานแตกต่างสำหรับการเรียกใช้เครื่องมือ</li>
52
- </ul>
53
-
54
- <h2>ปัญหา MCP</h2>
55
- <h3>"MCP server connection failed"</h3>
56
- <p>ตรวจสอบว่าคำสั่งเซิร์ฟเวอร์มีอยู่และพาธถูกต้อง ตรวจสอบไวยากรณ์ JSON config ด้วยคำสั่ง <code>/mcp</code></p>
57
-
58
- <h2>ปัญหาปลั๊กอิน</h2>
59
- <h3>ปลั๊กอินไม่โหลด</h3>
60
- <p>ตรวจสอบรูปแบบและตำแหน่ง manifest ของปลั๊กอิน ใช้ <code>/plugin</code> และ <code>/reload-plugins</code> เพื่อรีเฟรช</p>
61
-
62
- <h2>การขอความช่วยเหลือ</h2>
63
- <ul>
64
- <li><strong>การตรวจสอบในแอป:</strong> <code>/doctor</code> ตรวจสอบสภาพแวดล้อมอย่างครอบคลุม</li>
65
- <li><strong>ภาพรวมสถานะ:</strong> <code>/status</code> เวอร์ชัน, โมเดล, การเชื่อมต่อ API</li>
66
- <li><strong>GitHub Issues:</strong> รายงานบั๊กและขอฟีเจอร์</li>
67
- <li><strong>โหมด Debug:</strong> รันด้วย <code>DEBUG=1</code> หรือ <code>DEBUG=provider:anthropic</code></li>
68
- </ul>
69
-
70
- <footer class="footer">
71
- <span>Clew Code v0.2.4 โอเพนซอร์ส</span>
72
- <div class="footer-links">
73
- <a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
74
- <a href="https://github.com/JonusNattapong/ClewCode/issues">ปัญหา</a>
75
- <a href="https://npmjs.com/package/clew-code">npm</a>
76
- </div>
77
- </footer>
78
- </main>
79
- <nav class="toc-sidebar"></nav>
80
- </div>
81
- </div>
82
- <script src="js/main.js"></script>
83
- </body>
84
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="th">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>การแก้ปัญหา — Clew</title>
7
+ <meta name="description" content="ปัญหาทั่วไปและวิธีแก้ไขสำหรับ Clew — คีย์ผู้ให้บริการ, ข้อผิดพลาด build, MCP, ปลั๊กอิน, และปัญหารันไทม์">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap" rel="stylesheet">
11
+ <link rel="stylesheet" href="css/styles.css">
12
+ <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
+ </head>
14
+ <body>
15
+ <header class="header"></header>
16
+ <div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
17
+ <div class="content-wrap"><main class="content">
18
+ <div class="breadcrumbs"><a href="index.th.html">หน้าแรก</a><span class="sep">/</span><span>การแก้ปัญหา</span></div>
19
+ <h1>การแก้ปัญหา</h1>
20
+ <p class="section-subtitle">เริ่มต้นด้วย <code>/doctor</code> — มันตรวจสอบเวอร์ชันรันไทม์, ข้อมูลประจำตัวผู้ให้บริการ, ความสมบูรณ์ของการตั้งค่า, สถานะปลั๊กอิน/MCP, และ Sentry telemetry</p>
21
+
22
+ <h2>ปัญหาเริ่มต้น</h2>
23
+ <h3>"command not found: clew"</h3>
24
+ <p>พาธติดตั้ง global npm อาจไม่อยู่ใน <code>PATH</code> ใช้ <code>npx clew-code</code> หรือ <code>bun x clew-code</code> เป็นทางเลือก</p>
25
+
26
+ <h3>"Bun not found"</h3>
27
+ <p>Clew ต้องใช้ <a href="https://bun.sh">Bun 1.3+</a> เป็นรันไทม์สำหรับแพ็กเกจ npm</p>
28
+
29
+ <h2>ปัญหาผู้ให้บริการ</h2>
30
+ <h3>"No API key configured"</h3>
31
+ <p>ตั้งค่าคีย์ API อย่างน้อยหนึ่งรายการเป็นตัวแปรสภาพแวดล้อม ดู <a href="providers.th.html">ผู้ให้บริการ</a> สำหรับรายการทั้งหมด</p>
32
+ <pre><code>export ANTHROPIC_API_KEY=sk-ant-...
33
+ export DEEPSEEK_API_KEY=sk-...</code></pre>
34
+ <p>รัน <code>/doctor</code> เพื่อตรวจสอบผู้ให้บริการที่ตั้งค่า</p>
35
+
36
+ <h3>"Rate limited" หรือ "Quota exceeded"</h3>
37
+ <p>ตั้งค่าโมเดลสำรองผ่าน CLI: <code>--fallback-model &lt;model&gt;</code> หรือใช้ <code>/model</code> เพื่อสลับไปยังผู้ให้บริการอื่น</p>
38
+
39
+ <h2>ปัญหา Build</h2>
40
+ <h3>ข้อผิดพลาด TypeScript ระหว่าง build</h3>
41
+ <pre><code>bun run build
42
+ # ข้อผิดพลาด TypeScript อาจอยู่ในโค้ดที่ยังไม่ได้ commit หรือโมดูลภายนอก
43
+ # รันการตรวจสอบเป้าหมาย:
44
+ bun x tsc --noEmit
45
+ bun test <targeted-path></code></pre>
46
+
47
+ <h3>ปัญหาเฉพาะ Windows</h3>
48
+ <ul>
49
+ <li>ripgrep แถมมาที่ <code>src/utils/vendor/ripgrep/x64-win32/rg.exe</code></li>
50
+ <li>TTY polyfill อาจจำเป็นสำหรับ Ink compatibility</li>
51
+ <li>PowerShell และ Bash อาจทำงานแตกต่างสำหรับการเรียกใช้เครื่องมือ</li>
52
+ </ul>
53
+
54
+ <h2>ปัญหา MCP</h2>
55
+ <h3>"MCP server connection failed"</h3>
56
+ <p>ตรวจสอบว่าคำสั่งเซิร์ฟเวอร์มีอยู่และพาธถูกต้อง ตรวจสอบไวยากรณ์ JSON config ด้วยคำสั่ง <code>/mcp</code></p>
57
+
58
+ <h2>ปัญหาปลั๊กอิน</h2>
59
+ <h3>ปลั๊กอินไม่โหลด</h3>
60
+ <p>ตรวจสอบรูปแบบและตำแหน่ง manifest ของปลั๊กอิน ใช้ <code>/plugin</code> และ <code>/reload-plugins</code> เพื่อรีเฟรช</p>
61
+
62
+ <h2>การขอความช่วยเหลือ</h2>
63
+ <ul>
64
+ <li><strong>การตรวจสอบในแอป:</strong> <code>/doctor</code> — ตรวจสอบสภาพแวดล้อมอย่างครอบคลุม</li>
65
+ <li><strong>ภาพรวมสถานะ:</strong> <code>/status</code> — เวอร์ชัน, โมเดล, การเชื่อมต่อ API</li>
66
+ <li><strong>GitHub Issues:</strong> รายงานบั๊กและขอฟีเจอร์</li>
67
+ <li><strong>โหมด Debug:</strong> รันด้วย <code>DEBUG=1</code> หรือ <code>DEBUG=provider:anthropic</code></li>
68
+ </ul>
69
+
70
+ <footer class="footer">
71
+ <span>Clew Code v0.2.7 — โอเพนซอร์ส</span>
72
+ <div class="footer-links">
73
+ <a href="https://github.com/ClewCode/ClewCode">GitHub</a>
74
+ <a href="https://github.com/ClewCode/ClewCode/issues">ปัญหา</a>
75
+ <a href="https://npmjs.com/package/clew-code">npm</a>
76
+ </div>
77
+ </footer>
78
+ </main>
79
+ <nav class="toc-sidebar"></nav>
80
+ </div>
81
+ </div>
82
+ <script src="js/main.js"></script>
83
+ </body>
84
+ </html>
85
+