File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -86,4 +86,8 @@ function mediator:mcps()
8686 return mcps
8787end
8888
89+ function mediator :id ()
90+ return (self .state and self .state .id )
91+ end
92+
8993return mediator
Original file line number Diff line number Diff line change @@ -1275,7 +1275,7 @@ function M:_send_message(message)
12751275
12761276 local contexts = self :get_contexts ()
12771277 self .mediator :send (" chat/prompt" , {
1278- chatId = self .id ,
1278+ chatId = self .mediator : id () ,
12791279 requestId = tostring (os.time ()),
12801280 message = message ,
12811281 contexts = contexts or {},
Original file line number Diff line number Diff line change 1717--- @field status string
1818---
1919--- @class eca.State
20+ --- @field id string ?
2021--- @field status eca.StateStatus
2122--- @field config eca.StateConfig
2223--- @field usage eca.StateUsage
@@ -26,6 +27,7 @@ local State = {}
2627--- @return eca.State
2728function State ._new ()
2829 local instance = setmetatable ({
30+ id = nil ,
2931 status = {
3032 state = " idle" ,
3133 text = " Idle" ,
@@ -99,6 +101,10 @@ function State:_chat_content_received(message)
99101 return
100102 end
101103
104+ if message .params .chatId and message .params .chatId ~= self .id then
105+ self .id = message .params .chatId
106+ end
107+
102108 local content = message .params .content
103109
104110 if content .type == " progress" then
You can’t perform that action at this time.
0 commit comments