@rahul05ranjan/dhruv-cli 1.3.0 โ†’ 1.4.6

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 (103) hide show
  1. package/.github/ENTERPRISE.md +275 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +45 -17
  3. package/.github/ISSUE_TEMPLATE/documentation_issue.md +61 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.md +61 -9
  5. package/.github/ISSUE_TEMPLATE/security_vulnerability.md +74 -0
  6. package/.github/dependabot.yml +42 -2
  7. package/.github/pull_request_template.md +13 -0
  8. package/.github/workflows/build-publish.yml +154 -0
  9. package/.github/workflows/ci.yml +251 -18
  10. package/.github/workflows/contribution.yml +169 -27
  11. package/.github/workflows/dependabot-auto-merge.yml +61 -2
  12. package/.github/workflows/deploy.yml +336 -0
  13. package/.github/workflows/monitoring.yml +270 -0
  14. package/.github/workflows/release.yml +229 -0
  15. package/.github/workflows/security.yml +198 -0
  16. package/.releaserc.json +50 -0
  17. package/AGENTS.md +13 -0
  18. package/CHANGELOG.md +8 -0
  19. package/PUBLISHING_FIX.md +92 -0
  20. package/__tests__/core.test.ts +318 -0
  21. package/__tests__/setup.ts +61 -0
  22. package/__tests__/workflows.test.ts +95 -0
  23. package/dist/commands/explain.js +13 -44
  24. package/dist/commands/fix.js +13 -38
  25. package/dist/commands/generate.js +45 -54
  26. package/dist/commands/health.d.ts +1 -0
  27. package/dist/commands/health.js +376 -0
  28. package/dist/commands/init.js +47 -42
  29. package/dist/commands/menu.js +90 -2
  30. package/dist/commands/metrics.d.ts +1 -0
  31. package/dist/commands/metrics.js +51 -0
  32. package/dist/commands/optimize.js +42 -34
  33. package/dist/commands/review.js +52 -48
  34. package/dist/commands/security-check.js +52 -42
  35. package/dist/commands/status.d.ts +1 -0
  36. package/dist/commands/status.js +45 -0
  37. package/dist/commands/suggest.js +13 -39
  38. package/dist/config/config.js +30 -2
  39. package/dist/core/ai.d.ts +77 -2
  40. package/dist/core/ai.js +207 -30
  41. package/dist/core/command-runner.d.ts +17 -0
  42. package/dist/core/command-runner.js +78 -0
  43. package/dist/core/logger.d.ts +40 -0
  44. package/dist/core/logger.js +138 -0
  45. package/dist/core/metrics.d.ts +34 -0
  46. package/dist/core/metrics.js +206 -0
  47. package/dist/core/prompts.d.ts +1 -0
  48. package/dist/core/prompts.js +121 -0
  49. package/dist/core/security.d.ts +34 -0
  50. package/dist/core/security.js +197 -0
  51. package/dist/index.js +43 -3
  52. package/dist/utils/ux.d.ts +3 -0
  53. package/dist/utils/ux.js +15 -0
  54. package/docs/agents/domain.md +51 -0
  55. package/docs/agents/issue-tracker.md +45 -0
  56. package/docs/agents/triage-labels.md +15 -0
  57. package/docs/api/.nojekyll +1 -0
  58. package/docs/api/assets/hierarchy.js +1 -0
  59. package/docs/api/assets/highlight.css +71 -0
  60. package/docs/api/assets/icons.js +18 -0
  61. package/docs/api/assets/icons.svg +1 -0
  62. package/docs/api/assets/main.js +60 -0
  63. package/docs/api/assets/navigation.js +1 -0
  64. package/docs/api/assets/search.js +1 -0
  65. package/docs/api/assets/style.css +1633 -0
  66. package/docs/api/hierarchy.html +1 -0
  67. package/docs/api/index.html +39 -0
  68. package/docs/api/modules.html +1 -0
  69. package/eslint.config.js +170 -0
  70. package/jest.config.json +37 -0
  71. package/lighthouserc.json +22 -0
  72. package/logs/.8a99b6cf655346317fdbf29f4fffcf91131432f3-audit.json +15 -0
  73. package/logs/.eee104bf8fff5ecd38a6a2842df260de6470a7c3-audit.json +15 -0
  74. package/package.json +62 -8
  75. package/src/commands/explain.ts +13 -42
  76. package/src/commands/fix.ts +13 -31
  77. package/src/commands/generate.ts +47 -46
  78. package/src/commands/health.ts +440 -0
  79. package/src/commands/init.ts +48 -42
  80. package/src/commands/menu.ts +86 -2
  81. package/src/commands/metrics.ts +65 -0
  82. package/src/commands/optimize.ts +40 -28
  83. package/src/commands/review.ts +54 -40
  84. package/src/commands/security-check.ts +54 -34
  85. package/src/commands/status.ts +47 -0
  86. package/src/commands/suggest.ts +13 -32
  87. package/src/config/config.ts +35 -2
  88. package/src/core/ai.ts +237 -26
  89. package/src/core/command-runner.ts +105 -0
  90. package/src/core/logger.ts +194 -0
  91. package/src/core/metrics.ts +232 -0
  92. package/src/core/prompts.ts +128 -0
  93. package/src/core/security.ts +243 -0
  94. package/src/index.ts +50 -3
  95. package/src/utils/ux.ts +18 -0
  96. package/test-suite.sh +147 -0
  97. package/tsconfig.json +3 -2
  98. package/typedoc.json +44 -0
  99. package/types/global.d.ts +13 -0
  100. package/validate-workflows.sh +270 -0
  101. package/.eslintignore +0 -1
  102. package/.eslintrc.cjs +0 -43
  103. package/src/core/ai.test.js +0 -40
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Dhruv CLI API - v1.4.0</title><meta name="description" content="Documentation for Dhruv CLI API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">Dhruv CLI API - v1.4.0</a><div id="tsd-toolbar-links"><a href="https://rahul05ranjan.github.io/dhruv-cli/">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli">GitHub</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>Dhruv CLI API - v1.4.0</h1></div><h2>Hierarchy Summary</h2></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://rahul05ranjan.github.io/dhruv-cli/" class="tsd-nav-link">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli" class="tsd-nav-link">GitHub</a></nav><nav class="tsd-navigation"><a href="modules.html">Dhruv CLI API - v1.4.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,39 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Dhruv CLI API - v1.4.0</title><meta name="description" content="Documentation for Dhruv CLI API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">Dhruv CLI API - v1.4.0</a><div id="tsd-toolbar-links"><a href="https://rahul05ranjan.github.io/dhruv-cli/">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli">GitHub</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>Dhruv CLI API - v1.4.0</h1></div><div class="tsd-panel tsd-typography"><h1 id="dhruv-cli" class="tsd-anchor-link">Dhruv CLI<a href="#dhruv-cli" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p><a href="https://www.npmjs.com/package/@rahul05ranjan/dhruv-cli">๐Ÿ“ฆ View on npm</a>
2
+ <a href="https://rahul05ranjan.github.io/dhruv-cli/">๐Ÿ“– View Documentation on GitHub Pages</a></p>
3
+ <p>AI-powered CLI assistant for developers using Ollama.</p>
4
+ <h2 id="๐Ÿš€-features" class="tsd-anchor-link">๐Ÿš€ Features<a href="#๐Ÿš€-features" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
5
+ <li>Smart command suggestions: <code>suggest</code>, <code>explain</code>, <code>fix</code></li>
6
+ <li>Project context detection (Node, React, Python, etc.)</li>
7
+ <li>Code review: <code>review &lt;fileOrDir&gt;</code></li>
8
+ <li>Code optimization: <code>optimize &lt;file&gt;</code></li>
9
+ <li>Security analysis: <code>security-check [fileOrDir]</code></li>
10
+ <li>Test/code generation: <code>generate &lt;type&gt; &lt;target&gt;</code></li>
11
+ <li>Interactive setup: <code>init</code></li>
12
+ <li>Streaming AI responses in terminal</li>
13
+ <li>Syntax highlighting for code output</li>
14
+ <li>Progress bars for long operations</li>
15
+ <li>Plugin system: drop ESM modules in <code>plugins/</code></li>
16
+ <li>Autocomplete: <code>completion [shell]</code></li>
17
+ <li>Offline-first with local Ollama models</li>
18
+ <li>Beautiful, modern CLI UX</li>
19
+ </ul>
20
+ <h2 id="๐Ÿ› ๏ธ-installation" class="tsd-anchor-link">๐Ÿ› ๏ธ Installation<a href="#๐Ÿ› ๏ธ-installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-3">-g</span><span class="hl-1"> </span><span class="hl-2">@rahul05ranjan/dhruv-cli</span>
21
+ </code><button type="button">Copy</button></pre>
22
+
23
+ <p>Or visit the npm page: <a href="https://www.npmjs.com/package/@rahul05ranjan/dhruv-cli">https://www.npmjs.com/package/@rahul05ranjan/dhruv-cli</a></p>
24
+ <h2 id="๐Ÿ“-usage-examples" class="tsd-anchor-link">๐Ÿ“ Usage Examples<a href="#๐Ÿ“-usage-examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="bash"><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">suggest</span><span class="hl-1"> </span><span class="hl-2">&quot;deploy react app to vercel&quot;</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">explain</span><span class="hl-1"> </span><span class="hl-2">&quot;git rebase vs merge&quot;</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">fix</span><span class="hl-1"> </span><span class="hl-2">&quot;cors error in express&quot;</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">review</span><span class="hl-1"> </span><span class="hl-2">src/</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">optimize</span><span class="hl-1"> </span><span class="hl-2">package.json</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">security-check</span><span class="hl-1"> </span><span class="hl-2">src/</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">generate</span><span class="hl-1"> </span><span class="hl-2">tests</span><span class="hl-1"> </span><span class="hl-2">src/utils/helpers.js</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">init</span><br/><span class="hl-0">dhruv</span><span class="hl-1"> </span><span class="hl-2">completion</span><span class="hl-1"> </span><span class="hl-2">bash</span><span class="hl-1"> </span><span class="hl-4">&gt;</span><span class="hl-1"> </span><span class="hl-2">dhruv-complete.sh</span><span class="hl-1"> </span><span class="hl-5"># Enable tab completion</span>
25
+ </code><button type="button">Copy</button></pre>
26
+
27
+ <h2 id="๐Ÿงฉ-plugins" class="tsd-anchor-link">๐Ÿงฉ Plugins<a href="#๐Ÿงฉ-plugins" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Add new commands by dropping ESM modules in the <code>plugins/</code> directory. Example:</p>
28
+ <pre><code class="js"><span class="hl-5">// plugins/hello.js</span><br/><span class="hl-4">export</span><span class="hl-1"> </span><span class="hl-4">default</span><span class="hl-1"> (</span><span class="hl-6">program</span><span class="hl-1">) </span><span class="hl-4">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> program.</span><span class="hl-0">command</span><span class="hl-1">(</span><span class="hl-2">&#39;hello-plugin&#39;</span><span class="hl-1">).</span><span class="hl-0">action</span><span class="hl-1">(() </span><span class="hl-4">=&gt;</span><span class="hl-1"> console.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Hello from plugin!&#39;</span><span class="hl-1">));</span><br/><span class="hl-1">};</span>
29
+ </code><button type="button">Copy</button></pre>
30
+
31
+ <h2 id="๐Ÿ“ฆ-configuration" class="tsd-anchor-link">๐Ÿ“ฆ Configuration<a href="#๐Ÿ“ฆ-configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
32
+ <li>Run <code>dhruv init</code> to set model, response format, and verbosity.</li>
33
+ <li>Project type auto-detected for context-aware suggestions.</li>
34
+ </ul>
35
+ <h2 id="๐Ÿ–ฅ๏ธ-advanced-ux" class="tsd-anchor-link">๐Ÿ–ฅ๏ธ Advanced UX<a href="#๐Ÿ–ฅ๏ธ-advanced-ux" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
36
+ <li>Streaming output, syntax highlighting, progress bars, colored errors, and interactive menus.</li>
37
+ </ul>
38
+ <h2 id="license" class="tsd-anchor-link">License<a href="#license" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>MIT</p>
39
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#dhruv-cli"><span>Dhruv <wbr/>CLI</span></a><ul><li><a href="#๐Ÿš€-features"><span>๐Ÿš€ <wbr/>Features</span></a></li><li><a href="#๐Ÿ› ๏ธ-installation"><span>๐Ÿ› ๏ธ <wbr/>Installation</span></a></li><li><a href="#๐Ÿ“-usage-examples"><span>๐Ÿ“ <wbr/>Usage <wbr/>Examples</span></a></li><li><a href="#๐Ÿงฉ-plugins"><span>๐Ÿงฉ <wbr/>Plugins</span></a></li><li><a href="#๐Ÿ“ฆ-configuration"><span>๐Ÿ“ฆ <wbr/>Configuration</span></a></li><li><a href="#๐Ÿ–ฅ๏ธ-advanced-ux"><span>๐Ÿ–ฅ๏ธ <wbr/>Advanced <wbr/>UX</span></a></li><li><a href="#license"><span>License</span></a></li></ul></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://rahul05ranjan.github.io/dhruv-cli/" class="tsd-nav-link">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli" class="tsd-nav-link">GitHub</a></nav><nav class="tsd-navigation"><a href="modules.html">Dhruv CLI API - v1.4.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="./"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Dhruv CLI API - v1.4.0</title><meta name="description" content="Documentation for Dhruv CLI API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="index.html" class="title">Dhruv CLI API - v1.4.0</a><div id="tsd-toolbar-links"><a href="https://rahul05ranjan.github.io/dhruv-cli/">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli">GitHub</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"></ul><h1>Dhruv CLI API - v1.4.0</h1></div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://rahul05ranjan.github.io/dhruv-cli/" class="tsd-nav-link">Home</a><a href="https://github.com/rahul05ranjan/dhruv-cli" class="tsd-nav-link">GitHub</a></nav><nav class="tsd-navigation"><a href="modules.html" class="current">Dhruv CLI API - v1.4.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -0,0 +1,170 @@
1
+ import js from '@eslint/js';
2
+ import tseslint from 'typescript-eslint';
3
+
4
+ export default [
5
+ // Base configuration
6
+ js.configs.recommended,
7
+
8
+ // Global ignores (migrated from .eslintignore)
9
+ {
10
+ ignores: [
11
+ 'dist/',
12
+ 'node_modules/',
13
+ 'node-fetch.d.ts',
14
+ 'coverage/',
15
+ '.dhruv-cache/',
16
+ 'logs/',
17
+ 'docs/'
18
+ ]
19
+ },
20
+
21
+ // TypeScript files configuration (excluding test files)
22
+ {
23
+ files: ['**/*.ts', '**/*.tsx'],
24
+ ignores: ['__tests__/**/*', '**/*.test.ts', '**/*.spec.ts', 'src/core/logger.ts', 'src/core/security.ts'],
25
+ languageOptions: {
26
+ parser: tseslint.parser,
27
+ parserOptions: {
28
+ project: './tsconfig.json',
29
+ sourceType: 'module',
30
+ ecmaVersion: 2020,
31
+ },
32
+ globals: {
33
+ console: 'readonly',
34
+ process: 'readonly',
35
+ Buffer: 'readonly',
36
+ setTimeout: 'readonly',
37
+ __dirname: 'readonly',
38
+ __filename: 'readonly',
39
+ global: 'readonly',
40
+ module: 'readonly',
41
+ require: 'readonly',
42
+ exports: 'readonly',
43
+ },
44
+ },
45
+ plugins: {
46
+ '@typescript-eslint': tseslint.plugin,
47
+ },
48
+ rules: {
49
+ ...tseslint.configs.recommended.rules,
50
+ 'no-console': 'off',
51
+ '@typescript-eslint/no-unused-vars': ['warn', {
52
+ 'argsIgnorePattern': '^_|error|e',
53
+ 'varsIgnorePattern': '^_|response|error|e|Command|printSuccess|printInfo|printWarning|detectProjectType',
54
+ 'ignoreRestSiblings': true
55
+ }],
56
+ '@typescript-eslint/explicit-function-return-type': 'off',
57
+ '@typescript-eslint/no-explicit-any': ['warn', {
58
+ 'ignoreRestArgs': true
59
+ }],
60
+ 'no-var': 'error',
61
+ 'prefer-const': 'error',
62
+ 'eqeqeq': ['error', 'always'],
63
+ 'no-undef': 'off', // Turn off because we're using globals
64
+ 'no-redeclare': 'off', // Allow redeclaration of globals
65
+ 'no-unused-vars': 'off', // Turn off base rule, use @typescript-eslint/no-unused-vars
66
+ },
67
+ },
68
+
69
+ // Lenient configuration for files with external library interfaces
70
+ {
71
+ files: ['src/core/logger.ts', 'src/core/security.ts'],
72
+ languageOptions: {
73
+ parser: tseslint.parser,
74
+ parserOptions: {
75
+ project: './tsconfig.json',
76
+ sourceType: 'module',
77
+ ecmaVersion: 2020,
78
+ },
79
+ },
80
+ plugins: {
81
+ '@typescript-eslint': tseslint.plugin,
82
+ },
83
+ rules: {
84
+ ...tseslint.configs.recommended.rules,
85
+ 'no-console': 'off',
86
+ '@typescript-eslint/no-unused-vars': 'off',
87
+ '@typescript-eslint/explicit-function-return-type': 'off',
88
+ '@typescript-eslint/no-explicit-any': 'off', // Allow any in these files due to Winston/security libraries
89
+ 'no-var': 'error',
90
+ 'prefer-const': 'error',
91
+ 'eqeqeq': ['error', 'always'],
92
+ 'no-undef': 'off',
93
+ 'no-redeclare': 'off',
94
+ 'no-unused-vars': 'off',
95
+ },
96
+ },
97
+
98
+ // JavaScript files configuration
99
+ {
100
+ files: ['**/*.js'],
101
+ languageOptions: {
102
+ sourceType: 'module',
103
+ ecmaVersion: 2020,
104
+ globals: {
105
+ console: 'readonly',
106
+ process: 'readonly',
107
+ Buffer: 'readonly',
108
+ setTimeout: 'readonly',
109
+ __dirname: 'readonly',
110
+ __filename: 'readonly',
111
+ global: 'readonly',
112
+ module: 'readonly',
113
+ require: 'readonly',
114
+ exports: 'readonly',
115
+ },
116
+ },
117
+ rules: {
118
+ 'no-console': 'off',
119
+ 'no-var': 'error',
120
+ 'prefer-const': 'error',
121
+ 'eqeqeq': ['error', 'always'],
122
+ 'no-undef': 'off', // Turn off because we're using globals
123
+ 'no-redeclare': 'off', // Allow redeclaration of globals
124
+ 'no-unused-vars': 'off', // Allow unused vars in JS files for flexibility
125
+ },
126
+ },
127
+
128
+ // Test files configuration (separate project config)
129
+ {
130
+ files: ['__tests__/**/*.{ts,js}', '**/*.test.{ts,js}', '**/*.spec.{ts,js}'],
131
+ languageOptions: {
132
+ parser: tseslint.parser,
133
+ parserOptions: {
134
+ sourceType: 'module',
135
+ ecmaVersion: 2020,
136
+ // Don't use project for test files since they're not in tsconfig.json
137
+ },
138
+ globals: {
139
+ console: 'readonly',
140
+ process: 'readonly',
141
+ Buffer: 'readonly',
142
+ setTimeout: 'readonly',
143
+ describe: 'readonly',
144
+ it: 'readonly',
145
+ test: 'readonly',
146
+ expect: 'readonly',
147
+ beforeEach: 'readonly',
148
+ afterEach: 'readonly',
149
+ beforeAll: 'readonly',
150
+ afterAll: 'readonly',
151
+ jest: 'readonly',
152
+ },
153
+ },
154
+ plugins: {
155
+ '@typescript-eslint': tseslint.plugin,
156
+ },
157
+ rules: {
158
+ '@typescript-eslint/no-unused-vars': ['warn', {
159
+ 'argsIgnorePattern': '^_|error|e',
160
+ 'varsIgnorePattern': '^_|response|error|e|Command|printSuccess|printInfo|printWarning|detectProjectType',
161
+ 'ignoreRestSiblings': true
162
+ }],
163
+ '@typescript-eslint/explicit-function-return-type': 'off',
164
+ '@typescript-eslint/no-explicit-any': 'warn',
165
+ 'no-undef': 'off', // Turn off because we're using globals
166
+ 'no-redeclare': 'off', // Allow redeclaration of globals
167
+ 'no-unused-vars': 'off', // Turn off base rule, use @typescript-eslint/no-unused-vars
168
+ },
169
+ },
170
+ ];
@@ -0,0 +1,37 @@
1
+ {
2
+ "preset": "ts-jest",
3
+ "testEnvironment": "node",
4
+ "roots": ["<rootDir>/src", "<rootDir>/__tests__"],
5
+ "testMatch": ["**/__tests__/**/*.test.ts", "**/*.test.ts", "**/*.spec.ts"],
6
+ "testPathIgnorePatterns": ["/node_modules/", "/dist/", "/coverage/", "\\.test\\.js$", "\\.spec\\.js$"],
7
+ "transform": {
8
+ "^.+\\.ts$": "ts-jest"
9
+ },
10
+ "moduleNameMapper": {
11
+ "^(\\.{1,2}/.*)\\.js$": "$1"
12
+ },
13
+ "collectCoverageFrom": [
14
+ "src/**/*.ts",
15
+ "!src/**/*.d.ts",
16
+ "!src/index.ts"
17
+ ],
18
+ "coverageDirectory": "coverage",
19
+ "coverageReporters": ["text", "lcov", "html"],
20
+ "reporters": [
21
+ "default",
22
+ ["jest-junit", { "outputDirectory": "coverage", "outputName": "junit.xml" }]
23
+ ],
24
+ "coverageThreshold": {
25
+ "global": {
26
+ "branches": 7,
27
+ "functions": 5,
28
+ "lines": 6,
29
+ "statements": 6
30
+ }
31
+ },
32
+ "setupFilesAfterEnv": ["<rootDir>/__tests__/setup.ts"],
33
+ "testTimeout": 10000,
34
+ "verbose": true,
35
+ "forceExit": true,
36
+ "detectOpenHandles": true
37
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "ci": {
3
+ "collect": {
4
+ "numberOfRuns": 3,
5
+ "startServerCommand": "npm run start",
6
+ "startServerReadyPattern": "Dhruv CLI is running",
7
+ "url": ["http://localhost:3000"]
8
+ },
9
+ "assert": {
10
+ "assertions": {
11
+ "categories:performance": ["error", {"minScore": 0.8}],
12
+ "categories:accessibility": ["error", {"minScore": 0.9}],
13
+ "categories:best-practices": ["error", {"minScore": 0.9}],
14
+ "categories:seo": ["error", {"minScore": 0.9}],
15
+ "categories:pwa": "off"
16
+ }
17
+ },
18
+ "upload": {
19
+ "target": "temporary-public-storage"
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "keep": {
3
+ "days": true,
4
+ "amount": 30
5
+ },
6
+ "auditLog": "/home/rahul/Desktop/PROJECTS/dhruv-cli/logs/.8a99b6cf655346317fdbf29f4fffcf91131432f3-audit.json",
7
+ "files": [
8
+ {
9
+ "date": 1756285433393,
10
+ "name": "/home/rahul/Desktop/PROJECTS/dhruv-cli/logs/dhruv-error-2025-08-27.log",
11
+ "hash": "d7b55f1604a32af70dd71097f288f4c64aa78342ca90305309f78dad8905ed37"
12
+ }
13
+ ],
14
+ "hashType": "sha256"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "keep": {
3
+ "days": true,
4
+ "amount": 14
5
+ },
6
+ "auditLog": "/home/rahul/Desktop/PROJECTS/dhruv-cli/logs/.eee104bf8fff5ecd38a6a2842df260de6470a7c3-audit.json",
7
+ "files": [
8
+ {
9
+ "date": 1756285433392,
10
+ "name": "/home/rahul/Desktop/PROJECTS/dhruv-cli/logs/dhruv-2025-08-27.log",
11
+ "hash": "8e168d328c6da1e7736e2cde8c8d11f1c272f96976c25c5d55aabd90c1afc44b"
12
+ }
13
+ ],
14
+ "hashType": "sha256"
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rahul05ranjan/dhruv-cli",
3
- "version": "1.3.0",
3
+ "version": "1.4.6",
4
4
  "description": "AI-powered CLI assistant for developers using Ollama",
5
5
  "keywords": [
6
6
  "ai",
@@ -21,7 +21,30 @@
21
21
  "scripts": {
22
22
  "build": "tsc",
23
23
  "start": "node ./dist/index.js",
24
- "dev": "ts-node src/index.ts"
24
+ "dev": "ts-node src/index.ts",
25
+ "test": "jest",
26
+ "test:watch": "jest --watch",
27
+ "test:coverage": "jest --coverage",
28
+ "test:ci": "jest --coverage --watchAll=false --passWithNoTests",
29
+ "test:e2e": "jest --config jest.e2e.config.js",
30
+ "lint": "eslint . --ext .ts,.js",
31
+ "lint:fix": "eslint . --ext .ts,.js --fix",
32
+ "type-check": "tsc --noEmit",
33
+ "docs": "typedoc --out docs/api src",
34
+ "docs:serve": "npx serve docs",
35
+ "docs:publish": "npm run docs && gh-pages -d docs",
36
+ "benchmark": "autocannon -c 100 -d 10 http://localhost:3000",
37
+ "performance": "lighthouse http://localhost:3000 --output=json --output-path=./reports/lighthouse.json",
38
+ "security": "npm audit --audit-level=moderate",
39
+ "security:full": "npm audit --audit-level=info",
40
+ "clean": "rm -rf dist coverage .dhruv-cache logs/*.log",
41
+ "prepublishOnly": "npm run clean && npm run lint && npm run test:ci && npm run build",
42
+ "release": "semantic-release",
43
+ "release:beta": "semantic-release --tag beta",
44
+ "docker:build": "docker build -t dhruv-cli .",
45
+ "docker:run": "docker run -it dhruv-cli",
46
+ "health": "node dist/index.js health",
47
+ "metrics": "node dist/index.js metrics"
25
48
  },
26
49
  "dependencies": {
27
50
  "chalk": "^5.3.0",
@@ -29,21 +52,52 @@
29
52
  "cli-progress": "^3.12.0",
30
53
  "commander": "^14.0.0",
31
54
  "inquirer": "^12.6.3",
32
- "node-fetch": "^2.7.0",
55
+ "joi": "^18.2.9",
56
+ "node-fetch": "^3.3.2",
33
57
  "ollama": "^0.5.16",
34
- "ora": "^8.2.0"
58
+ "ora": "^8.2.0",
59
+ "prom-client": "^15.1.3",
60
+ "validator": "^13.15.35",
61
+ "winston": "^3.17.0",
62
+ "winston-daily-rotate-file": "^5.0.0"
35
63
  },
36
64
  "devDependencies": {
37
- "@eslint/js": "^8.57.1",
65
+ "@eslint/js": "^9.30.1",
66
+ "@lhci/cli": "^0.15.1",
67
+ "@semantic-release/changelog": "^6.0.3",
68
+ "@semantic-release/commit-analyzer": "^12.0.0",
69
+ "@semantic-release/git": "^10.0.1",
70
+ "@semantic-release/github": "^10.3.5",
71
+ "@semantic-release/npm": "^13.1.5",
72
+ "@semantic-release/release-notes-generator": "^12.1.0",
38
73
  "@types/inquirer": "^9.0.8",
74
+ "@types/jest": "^30.0.0",
75
+ "@types/nock": "^10.0.3",
39
76
  "@types/node": "^24.0.7",
77
+ "@types/supertest": "^6.0.3",
78
+ "@types/validator": "^13.15.2",
40
79
  "@typescript-eslint/eslint-plugin": "^8.35.0",
41
80
  "@typescript-eslint/parser": "^8.35.0",
42
- "eslint": "^8.57.1",
43
- "semantic-release": "^23.1.1",
81
+ "autocannon": "^8.0.0",
82
+ "benchmark": "^2.1.4",
83
+ "eslint": "^9.30.0",
84
+ "istanbul-lib-coverage": "^3.2.2",
85
+ "istanbul-lib-report": "^3.0.1",
86
+ "istanbul-reports": "^3.2.0",
87
+ "jest": "^30.1.0",
88
+ "jest-junit": "^17.0.0",
89
+ "jsdoc-to-markdown": "^9.1.2",
90
+ "lighthouse": "^12.8.1",
91
+ "nock": "^14.0.10",
92
+ "semantic-release": "^25.0.1",
93
+ "supertest": "^7.1.4",
94
+ "ts-jest": "^29.4.1",
44
95
  "ts-node": "^10.9.1",
96
+ "typedoc": "^0.28.11",
97
+ "typedoc-plugin-markdown": "^4.8.1",
45
98
  "typescript": "^5.8.3",
46
- "typescript-eslint": "^8.35.0"
99
+ "typescript-eslint": "^8.35.0",
100
+ "yaml": "^2.9.1"
47
101
  },
48
102
  "repository": {
49
103
  "type": "git",
@@ -1,45 +1,16 @@
1
- import { askOllama } from '../core/ai.js';
2
- import ora from 'ora';
3
- import chalk from 'chalk';
4
- import { loadConfig } from '../config/config.js';
5
- import { highlightCode, printError } from '../utils/ux.js';
1
+ import { runCommand } from '../core/command-runner.js';
2
+ import { getSystemMessage } from '../core/prompts.js';
6
3
 
7
4
  export async function explain(query: string) {
8
- const config = loadConfig();
9
- const spinner = ora('Thinking...').start();
10
- let streamed = '';
11
- const dhruvIntro = chalk.yellowBright('Dhruv CLI: Your AI-powered CLI assistant for developers using Ollama.\n');
12
- try {
13
- spinner.stop();
14
- process.stdout.write(dhruvIntro); // Print Dhruv intro before explanation
15
- process.stdout.write(chalk.green('Explanation: '));
16
- await askOllama({
17
- prompt: `Explain: ${query}`,
18
- model: config.model,
19
- onToken: (token: string) => {
20
- streamed += token;
21
- process.stdout.write(chalk.cyan(token));
22
- }
23
- });
24
- process.stdout.write('\n');
25
- if (typeof highlightCode === 'function' && streamed.match(/```[a-z]*[\s\S]*?```/)) {
26
- const codeBlocks = streamed.match(/```([a-z]*)\n([\s\S]*?)```/g) || [];
27
- for (const block of codeBlocks) {
28
- const [, lang, code] = block.match(/```([a-z]*)\n([\s\S]*?)```/) || [];
29
- if (code) {
30
- try {
31
- console.log(highlightCode(code, lang || 'js'));
32
- } catch (err) {
33
- // Only log highlight errors in development
34
- if (process.env.NODE_ENV === 'development') {
35
- console.error('Highlight error:', err);
36
- }
37
- }
38
- }
39
- }
40
- }
41
- } catch (err) {
42
- printError('Failed to get explanation.');
43
- console.error(chalk.red((err as Error).message));
44
- }
5
+ await runCommand({
6
+ name: 'explain',
7
+ input: { query },
8
+ header: '๐Ÿ“š Explanation: ',
9
+ buildRequest: (input, model) => ({
10
+ prompt: input.query,
11
+ systemMessage: getSystemMessage('explain'),
12
+ model,
13
+ }),
14
+ footer: `๐Ÿ’ก Need more help? Try: dhruv suggest "${query}"`,
15
+ });
45
16
  }
@@ -1,34 +1,16 @@
1
- import { askOllama } from '../core/ai.js';
2
- import ora from 'ora';
3
- import chalk from 'chalk';
4
- import { loadConfig } from '../config/config.js';
5
- import { highlightCode, printError } from '../utils/ux.js';
1
+ import { runCommand } from '../core/command-runner.js';
2
+ import { getSystemMessage } from '../core/prompts.js';
6
3
 
7
4
  export async function fix(query: string) {
8
- const config = loadConfig();
9
- const spinner = ora('Analyzing issue...').start();
10
- let streamed = '';
11
- try {
12
- spinner.stop();
13
- process.stdout.write(chalk.green('Fix suggestion: '));
14
- await askOllama({
15
- prompt: `Fix: ${query}`,
16
- model: config.model,
17
- onToken: (token: string) => {
18
- streamed += token;
19
- process.stdout.write(chalk.cyan(token));
20
- }
21
- });
22
- process.stdout.write('\n');
23
- if (typeof highlightCode === 'function' && streamed.match(/```[a-z]*[\s\S]*?```/)) {
24
- const codeBlocks = streamed.match(/```([a-z]*)\n([\s\S]*?)```/g) || [];
25
- for (const block of codeBlocks) {
26
- const [, lang, code] = block.match(/```([a-z]*)\n([\s\S]*?)```/) || [];
27
- if (code) try { console.log(highlightCode(code, lang || 'js')); } catch (err) { console.error('Highlight error:', err); }
28
- }
29
- }
30
- } catch (err) {
31
- printError('Failed to get fix suggestion.');
32
- console.error(chalk.red((err as Error).message));
33
- }
5
+ await runCommand({
6
+ name: 'fix',
7
+ input: { query },
8
+ header: '๐Ÿ”ง Fix Analysis: ',
9
+ buildRequest: (input, model) => ({
10
+ prompt: input.query,
11
+ systemMessage: getSystemMessage('fix'),
12
+ model,
13
+ }),
14
+ footer: `๐Ÿงช Want to test this? Try: dhruv generate tests <your-file>`,
15
+ });
34
16
  }