gaunt-sloth-assistant 0.0.4 → 0.0.7
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/RELEASE-HOWTO.md +12 -0
- package/ROADMAP.md +2 -0
- package/package.json +6 -1
- package/src/codeReview.js +3 -1
- package/src/utils.js +2 -2
package/RELEASE-HOWTO.md
ADDED
package/ROADMAP.md
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
Doing the following below and making it work stably should be sufficient to call it version 1.
|
6
6
|
|
7
7
|
### Add tests and gain reasonable coverage
|
8
|
+
### Configure eslint for code quality checks
|
9
|
+
### Automate release process
|
8
10
|
### Add project init command
|
9
11
|
Add a command to init certain model in certain project, for example `gsloth init gemini`
|
10
12
|
or `gsloth init` and select one of the provided options.
|
package/package.json
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"name": "gaunt-sloth-assistant",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.7",
|
4
4
|
"description": "",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Andrew Kondratev",
|
7
7
|
"type": "module",
|
8
8
|
"main": "index.js",
|
9
|
+
"repository": "github:andruhon/gaunt-sloth-assistant",
|
10
|
+
"engines": {
|
11
|
+
"node": ">=22.0.0",
|
12
|
+
"npm": ">=10.9.0"
|
13
|
+
},
|
9
14
|
"scripts": {
|
10
15
|
"test": "echo \"Error: no test specified\" && exit 1",
|
11
16
|
"test-run": "node --trace-deprecation index.js ask \"status check\""
|
package/src/codeReview.js
CHANGED
@@ -49,14 +49,16 @@ export async function review(source, preamble, diff) {
|
|
49
49
|
];
|
50
50
|
|
51
51
|
process.stdout.write("Reviewing.");
|
52
|
+
// TODO create proper progress indicator for async tasks.
|
52
53
|
const progress = setInterval(() => process.stdout.write('.'), 1000);
|
53
54
|
const output = await app.invoke({messages}, slothContext.session);
|
54
55
|
const filePath = path.resolve(process.cwd(), toFileSafeString(source)+'-'+fileSafeLocalDate()+".md");
|
56
|
+
process.stdout.write("\n");
|
55
57
|
display(`writing ${filePath}`);
|
56
58
|
// FIXME this looks ugly, there should be other way
|
57
59
|
const outputContent = output.messages[output.messages.length - 1].content;
|
58
60
|
clearInterval(progress);
|
59
|
-
|
61
|
+
process.stdout.write("\n");
|
60
62
|
// TODO highlight LLM output with something like Prism.JS (maybe system emoj are enough ✅⚠️❌)
|
61
63
|
display(outputContent);
|
62
64
|
try {
|
package/src/utils.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import {display, displayError, displaySuccess, displayWarning} from "./consoleUtils.js";
|
2
2
|
import {existsSync, readFileSync, writeFileSync} from "node:fs";
|
3
|
-
import {slothContext
|
3
|
+
import {slothContext} from "./config.js";
|
4
4
|
import {resolve} from "node:path";
|
5
5
|
import {spawn} from "node:child_process";
|
6
6
|
|
@@ -63,7 +63,7 @@ export function readStdin(program) {
|
|
63
63
|
}
|
64
64
|
});
|
65
65
|
process.stdin.on('end', function() {
|
66
|
-
|
66
|
+
process.stdout.write('.\n');
|
67
67
|
program.parse(process.argv);
|
68
68
|
});
|
69
69
|
}
|