threadlines 0.1.2 → 0.1.4
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 +2 -2
- package/dist/commands/check.js +2 -7
- package/dist/index.js +0 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,9 +21,9 @@ threadlines check
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Configuration
|
|
24
|
-
|
|
24
|
+
BANANA
|
|
25
25
|
- `THREADLINE_API_URL` - Server URL (default: http://localhost:3000)
|
|
26
|
-
-
|
|
26
|
+
- Can also be set with `--api-url` flag: `npx threadlines check --api-url http://your-server.com`
|
|
27
27
|
|
|
28
28
|
## Threadline Files
|
|
29
29
|
|
package/dist/commands/check.js
CHANGED
|
@@ -84,20 +84,15 @@ async function checkCommand(options) {
|
|
|
84
84
|
contextContent
|
|
85
85
|
};
|
|
86
86
|
});
|
|
87
|
-
// 4. Get API URL
|
|
87
|
+
// 4. Get API URL
|
|
88
88
|
const apiUrl = options.apiUrl || process.env.THREADLINE_API_URL || 'http://localhost:3000';
|
|
89
|
-
const apiKey = options.apiKey || process.env.OPENAI_API_KEY;
|
|
90
|
-
if (!apiKey) {
|
|
91
|
-
throw new Error('OpenAI API key required. Set OPENAI_API_KEY environment variable.');
|
|
92
|
-
}
|
|
93
89
|
// 5. Call review API
|
|
94
90
|
console.log(chalk_1.default.gray('🤖 Running threadline checks...'));
|
|
95
91
|
const client = new client_1.ReviewAPIClient(apiUrl);
|
|
96
92
|
const response = await client.review({
|
|
97
93
|
threadlines: threadlinesWithContext,
|
|
98
94
|
diff: gitDiff.diff,
|
|
99
|
-
files: gitDiff.changedFiles
|
|
100
|
-
apiKey
|
|
95
|
+
files: gitDiff.changedFiles
|
|
101
96
|
});
|
|
102
97
|
// 6. Display results
|
|
103
98
|
displayResults(response);
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,5 @@ program
|
|
|
17
17
|
.command('check')
|
|
18
18
|
.description('Check code against your threadlines')
|
|
19
19
|
.option('--api-url <url>', 'Threadline server URL', process.env.THREADLINE_API_URL || 'http://localhost:3000')
|
|
20
|
-
.option('--api-key <key>', 'OpenAI API key', process.env.OPENAI_API_KEY)
|
|
21
20
|
.action(check_1.checkCommand);
|
|
22
21
|
program.parse();
|