preserve stable conversational replies across stale context
CI / test (push) Failing after 26s

This commit is contained in:
m
2026-08-29 23:42:52 +03:00
parent b4ab280950
commit 6b9d5be299
+10 -11
View File
@@ -581,7 +581,11 @@ func main() {
conversationHistory = append(conversationHistory, recentUserHistory...)
gen2Context := interactiondomain.BuildScopedGen2Context(conversationHistory, string(session.PrincipalID))
retrievedMemoryReply := interactiondomain.RecallPersonalPreference(conversationHistory, effectiveTaskMessage)
if !creativeUserRequest && locationReply == "" {
stableConversationalReply, stableConversational := interactiondomain.StableConversationalReply(
effectiveTaskMessage,
interactiondomain.ClassifySpeechAct(effectiveTaskMessage, utterance.CorrectsUtteranceID),
)
if !creativeUserRequest && locationReply == "" && !stableConversational {
if continuation := interactiondomain.ContinueLocalSearch(effectiveTaskMessage, conversationHistory); continuation != "" {
continuationMessage = continuation
effectiveTaskMessage = continuation
@@ -731,7 +735,7 @@ func main() {
cognitiveAvailable = false
}
}
if !creativeRequest {
if !creativeRequest && !stableConversational {
if travelReply := interactiondomain.TravelSearchClarification(effectiveTaskMessage, conversationHistory); travelReply != "" {
semantic.Interpretation.Clarification = interaction.ClarificationRequired
semantic.Interpretation.Applicability = interaction.SemanticCandidateClarify
@@ -780,7 +784,7 @@ func main() {
} else if len(semantic.Projects) > 0 && semantic.Projects[0].Provenance == situation.ProjectResolutionInheritedFocus {
projectID = string(previousFocus.ProjectID)
}
if responseErr == nil && responseResult.Handled {
if responseErr == nil && responseResult.Handled && !stableConversational {
planningReply = responseResult.Reply
needsCognition = false
learning.recordReminderResponse(r.Context(), reminderResponseLearningInput{Utterance: utterance, Intent: intent, Result: responseResult, At: now})
@@ -917,7 +921,7 @@ func main() {
planningReply = helpPath.Reply
needsCognition = false
}
if !creativeRequest {
if !creativeRequest && !stableConversational {
if travelReply := interactiondomain.TravelSearchClarification(effectiveTaskMessage, conversationHistory); travelReply != "" {
planningReply = travelReply
needsCognition = false
@@ -1077,13 +1081,8 @@ func main() {
}
}
if !mediaAttempted && !mediaHandled && identityReply == "" && creativeReply == "" && creativeFallbackReply == "" {
stableAct := interactiondomain.ClassifySpeechAct(utterance.Content, utterance.CorrectsUtteranceID)
travelClarification := ""
if !creativeRequest {
travelClarification = interactiondomain.TravelSearchClarification(effectiveTaskMessage, conversationHistory)
}
if stableReply, stable := interactiondomain.StableConversationalReply(utterance.Content, stableAct); stable && travelClarification == "" {
planningReply = stableReply
if stableConversational {
planningReply = stableConversationalReply
needsCognition = false
}
}