jasper-recall 0.5.7 → 0.5.9
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.
|
@@ -56,7 +56,8 @@ function runRecall(query: string, options: { limit?: number; json?: boolean; pub
|
|
|
56
56
|
|
|
57
57
|
const recallPath = path.join(BIN_PATH, 'recall');
|
|
58
58
|
try {
|
|
59
|
-
|
|
59
|
+
// 120s timeout - first run may need to download model (~90MB)
|
|
60
|
+
return execSync(`${recallPath} ${args.join(' ')}`, { encoding: 'utf8', timeout: 120000 });
|
|
60
61
|
} catch (err: any) {
|
|
61
62
|
throw new Error(`Recall failed: ${err.message}`);
|
|
62
63
|
}
|
|
@@ -98,10 +99,13 @@ export default function register(api: PluginApi) {
|
|
|
98
99
|
const prompt = event.prompt;
|
|
99
100
|
|
|
100
101
|
// Detect fresh session (after /new or first message)
|
|
101
|
-
|
|
102
|
+
// Only trust explicit isNewSession flag, or messageCount if provided
|
|
103
|
+
const isFreshSession = event.isNewSession === true ||
|
|
102
104
|
event.messageCount === 0 ||
|
|
103
|
-
event.messageCount === 1
|
|
104
|
-
|
|
105
|
+
event.messageCount === 1;
|
|
106
|
+
|
|
107
|
+
// Debug logging
|
|
108
|
+
api.logger.debug?.(`[jasper-recall] Fresh session check: isNewSession=${event.isNewSession}, messageCount=${event.messageCount}, result=${isFreshSession}`);
|
|
105
109
|
|
|
106
110
|
// Skip heartbeats and system prompts
|
|
107
111
|
if (prompt.startsWith('HEARTBEAT') ||
|