@gabrihhh/jarvis 2.2.0 → 2.2.1
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/package.json +1 -1
- package/src/memory/query-by-path.js +4 -2
- package/src/statusline.js +4 -4
package/package.json
CHANGED
|
@@ -26,12 +26,12 @@ export async function queryByPath(cwd) {
|
|
|
26
26
|
const config = loadConfig();
|
|
27
27
|
const mode = config.trigger || 'session';
|
|
28
28
|
|
|
29
|
+
let lockFile = null;
|
|
29
30
|
if (mode === 'session') {
|
|
30
31
|
const sessionId = getCurrentSessionId();
|
|
31
32
|
if (sessionId) {
|
|
32
|
-
|
|
33
|
+
lockFile = join(tmpdir(), `jarvis-memory-${sessionId}.lock`);
|
|
33
34
|
if (existsSync(lockFile)) return null;
|
|
34
|
-
writeFileSync(lockFile, new Date().toISOString());
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -58,6 +58,8 @@ export async function queryByPath(cwd) {
|
|
|
58
58
|
const concepts = [...new Set(r.get('concepts'))].filter(Boolean);
|
|
59
59
|
const patterns = [...new Set(r.get('patterns'))].filter(Boolean);
|
|
60
60
|
|
|
61
|
+
if (lockFile) writeFileSync(lockFile, new Date().toISOString());
|
|
62
|
+
|
|
61
63
|
return [
|
|
62
64
|
`## Contexto do Repositório (jarvis-memory)`,
|
|
63
65
|
`**Projeto:** ${p.name} [${p.branch}]${p.description ? ' — ' + p.description : ''}`,
|
package/src/statusline.js
CHANGED
|
@@ -24,11 +24,11 @@ function readTriggerMode() {
|
|
|
24
24
|
} catch { return 'off'; }
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function buildBox(inner, color) {
|
|
27
|
+
function buildBox(inner, color, width = inner.length) {
|
|
28
28
|
return [
|
|
29
|
-
chalk.hex(color).bold(`╭${'─'.repeat(
|
|
29
|
+
chalk.hex(color).bold(`╭${'─'.repeat(width)}╮`),
|
|
30
30
|
chalk.hex(color).bold(`│${inner}│`),
|
|
31
|
-
chalk.hex(color).bold(`╰${'─'.repeat(
|
|
31
|
+
chalk.hex(color).bold(`╰${'─'.repeat(width)}╯`),
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -51,7 +51,7 @@ export function renderLine() {
|
|
|
51
51
|
const sessionMeta = getCurrentSessionFile();
|
|
52
52
|
const sessionId = sessionMeta?.sessionId;
|
|
53
53
|
const loaded = isMemoryLoaded(sessionId);
|
|
54
|
-
const loadedBox = loaded ? buildBox(' ⬡ ', GREEN) : null;
|
|
54
|
+
const loadedBox = loaded ? buildBox(' ⬡ ', GREEN, 4) : null;
|
|
55
55
|
|
|
56
56
|
const allEntries = readAllUsage();
|
|
57
57
|
|