feat(soul): add sessions layer, MCP connectors, conversation continuity fix
- sessions.el: new sessions module with session management and approval gate
- routes.el: wire /api/sessions routes (list, get, create, approve, tool_result)
- chat.el: thread-aware activation — short messages anchor to last reply
before engram compilation so follow-ups stay on-topic
- chat.el: agentic path tracks per-session history (session_hist_{id})
instead of shared conv_history, seeding each turn with prior context
- chat.el: add call_neuron_mcp, dispatch_tool, is_builtin_tool, next_bridge_id
agentic_loop, bridge_save, agentic_resume, handle_tool_result
- dist/soul: rebuild with all of the above
This commit is contained in:
+6
-6
@@ -278,17 +278,17 @@ async function send() {
|
||||
const thinking = addThinking();
|
||||
|
||||
try {
|
||||
const r = await fetch(SOUL + '/api/think', {
|
||||
const r = await fetch(SOUL + '/api/chat', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ content: text }),
|
||||
signal: AbortSignal.timeout(30000)
|
||||
body: JSON.stringify({ message: text, agentic: true }),
|
||||
signal: AbortSignal.timeout(60000)
|
||||
});
|
||||
const d = await r.json();
|
||||
thinking.remove();
|
||||
const reply = d.reply || d.error || '...';
|
||||
const suffix = d.label ? ` — [${d.kind || 'recall'}: ${d.label}]` : (d.kind && d.kind !== 'respond' ? ` — [${d.kind}]` : '');
|
||||
addMsg('soul', reply + suffix);
|
||||
const reply = d.reply || d.response || d.error || '...';
|
||||
const toolCount = d.tools_used && d.tools_used.length > 0 ? ` — [${d.tools_used.length} tool${d.tools_used.length > 1 ? 's' : ''}]` : '';
|
||||
addMsg('soul', reply + toolCount);
|
||||
} catch (e) {
|
||||
thinking.remove();
|
||||
addMsg('info', 'no response — is the soul running?');
|
||||
|
||||
Reference in New Issue
Block a user