scai 0.1.7 β 0.1.8
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.
package/README.md
CHANGED
|
@@ -25,7 +25,13 @@
|
|
|
25
25
|
## π¦ Installation
|
|
26
26
|
|
|
27
27
|
1. **Install [Ollama](https://ollama.com)**
|
|
28
|
-
- On Windows
|
|
28
|
+
- On **Windows**: [Download Ollama](https://ollama.com/download)
|
|
29
|
+
- On **macOS**:
|
|
30
|
+
- Install via Homebrew:
|
|
31
|
+
```bash
|
|
32
|
+
brew install ollama
|
|
33
|
+
```
|
|
34
|
+
- Or download directly from the [Ollama website](https://ollama.com/download)
|
|
29
35
|
- Ensure itβs added to your system `PATH`
|
|
30
36
|
|
|
31
37
|
2. **Install scai globally via npm:**
|
|
@@ -74,7 +80,7 @@ scai commit --commit
|
|
|
74
80
|
### π Refactor a JavaScript file
|
|
75
81
|
|
|
76
82
|
```bash
|
|
77
|
-
scai
|
|
83
|
+
scai refac path/to/file.js
|
|
78
84
|
```
|
|
79
85
|
|
|
80
86
|
A cleaned-up version will be written to:
|
|
@@ -118,3 +124,4 @@ For full terms, see the [LICENSE](./LICENSE) file.
|
|
|
118
124
|
We believe your code β and your workflow β should stay **yours**. scai runs entirely on your machine using open-source models and tools.
|
|
119
125
|
|
|
120
126
|
No internet connection. No vendor lock-in. Just local, private, AI-enhanced developer experience.
|
|
127
|
+
|
|
@@ -5,12 +5,10 @@ export const refactorModule = {
|
|
|
5
5
|
const prompt = `
|
|
6
6
|
You are a senior JavaScript/TypeScript engineer.
|
|
7
7
|
|
|
8
|
-
Refactor the code
|
|
9
|
-
- Split
|
|
10
|
-
- Improve naming, structure, and
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
ONLY return the plain refactored code.
|
|
8
|
+
Refactor the following code:
|
|
9
|
+
- Split into ~10 line functions
|
|
10
|
+
- Improve naming, structure, and clarity
|
|
11
|
+
- Return ONLY the valid refactored code (no markdown)
|
|
14
12
|
|
|
15
13
|
--- CODE START ---
|
|
16
14
|
${code}
|