Add a Value slot to dialogue.Slots
router.Slots already carries the fact payload; the dialogue copy did not, so a clarifying answer had nowhere to put it. InheritSlots carries it like Key. Reviewer: check the new inherit block does not overwrite a filled value. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CGeSZxh1DCtRxmFVSYVGvJ
This commit is contained in:
@@ -21,6 +21,7 @@ type Slots struct {
|
||||
Time time.Time
|
||||
HasTime bool
|
||||
Key string
|
||||
Value string // payload for a fact key, mirrors router.Slots.Value
|
||||
HasKey bool
|
||||
Text string
|
||||
Fn string
|
||||
@@ -104,6 +105,9 @@ func InheritSlots(prev, cur Slots) Slots {
|
||||
out.Key = prev.Key
|
||||
out.HasKey = true
|
||||
}
|
||||
if out.Value == "" && prev.Value != "" {
|
||||
out.Value = prev.Value
|
||||
}
|
||||
if out.Text == "" && prev.Text != "" {
|
||||
out.Text = prev.Text
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user