jvcs 1.5.7 → 1.5.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.
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
const blessed = require("blessed")
|
|
2
2
|
const aiAnalyzer = require("./aiAnalyzer")
|
|
3
|
+
const marked = require("marked");
|
|
4
|
+
const TerminalRenderer = require("marked-terminal");
|
|
5
|
+
|
|
6
|
+
marked.setOptions({
|
|
7
|
+
renderer: new TerminalRenderer()
|
|
8
|
+
});
|
|
3
9
|
|
|
4
10
|
function startUI(state) {
|
|
5
11
|
const screen = blessed.screen({
|
|
@@ -143,11 +149,12 @@ function startUI(state) {
|
|
|
143
149
|
mode: state.mode
|
|
144
150
|
})
|
|
145
151
|
|
|
146
|
-
|
|
152
|
+
const parsed = marked(aiSummary); // Markdown → terminal-friendly text
|
|
153
|
+
aiBox.setContent(parsed);
|
|
147
154
|
screen.render()
|
|
148
155
|
}
|
|
149
156
|
catch(error) {
|
|
150
|
-
aiBox.setContent(`AI Analysis failed: ${
|
|
157
|
+
aiBox.setContent(`AI Analysis failed: ${error.message || error}`);
|
|
151
158
|
screen.render()
|
|
152
159
|
}
|
|
153
160
|
}
|