clarify: a parked question belongs to the conversation that was asked (V-466)
The clarify store had one key for the whole daemon, so a question asked in the web chat and never answered captured the next three utterances from any source — telegram, or the mic — and answered them against a request the speaker never made. The reach now supplies a conversation id on the IPC Chat call, and the daemon carries it on the context the way it already carries the correlation id, so the six clarify call sites read it instead of a constant. The mic has no id of its own and keeps the key it had, so voice behaves exactly as before. mavweb has no per-browser session, so every tab is one conversation: right for a single-owner box, and still distinct from telegram and the mic. Dialogue sessions stay global on purpose — they are what she remembers about him, not what she is waiting for from one channel.
This commit is contained in:
+3
-3
@@ -986,7 +986,7 @@ type daemonAPI struct {
|
||||
getTrace func() *loop.TickTrace
|
||||
getMorningStatus func(ctx context.Context) []ipc.MorningRoutineStatus
|
||||
getDayPlan func(ctx context.Context) ipc.DayPlan
|
||||
chatFn func(ctx context.Context, text string) string
|
||||
chatFn func(ctx context.Context, conversation, text string) string
|
||||
getMCPServers func() []ipc.MCPServerStatus
|
||||
getEvents func(n int) []ipc.IntakeEvent
|
||||
}
|
||||
@@ -1002,11 +1002,11 @@ func (d *daemonAPI) RecentEvents(ctx context.Context, n int) ([]ipc.IntakeEvent,
|
||||
return d.getEvents(n), nil
|
||||
}
|
||||
|
||||
func (d *daemonAPI) Chat(ctx context.Context, text string) (string, error) {
|
||||
func (d *daemonAPI) Chat(ctx context.Context, conversation, text string) (string, error) {
|
||||
if d.chatFn == nil {
|
||||
return "", errors.New("mavend: chat not available")
|
||||
}
|
||||
return d.chatFn(ctx, text), nil
|
||||
return d.chatFn(ctx, conversation, text), nil
|
||||
}
|
||||
|
||||
// MCPServers — the configured MCP servers and their health (Vikunja #251).
|
||||
|
||||
Reference in New Issue
Block a user