Skip to content

Commit 8b63710

Browse files
authored
fix: debug mode cannot get app_id (#106)
1 parent 9c324aa commit 8b63710

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

python/dify_plugin/core/server/stdio/request_reader.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def _read_stream(self) -> Generator[PluginInStream, None, None]:
4141
data = TypeAdapter(dict[str, Any]).validate_json(line)
4242
yield PluginInStream(
4343
session_id=data["session_id"],
44+
conversation_id=data.get("conversation_id"),
45+
message_id=data.get("message_id"),
46+
app_id=data.get("app_id"),
47+
endpoint_id=data.get("endpoint_id"),
4448
event=PluginInStreamEvent.value_of(data["event"]),
4549
data=data["data"],
4650
reader=self,

python/dify_plugin/core/server/tcp/request_reader.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ def _read_stream(self) -> Generator[PluginInStream, None, None]:
193193
data = TypeAdapter(dict[str, Any]).validate_json(line)
194194
chunk = PluginInStream(
195195
session_id=data["session_id"],
196+
conversation_id=data.get("conversation_id"),
197+
message_id=data.get("message_id"),
198+
app_id=data.get("app_id"),
199+
endpoint_id=data.get("endpoint_id"),
196200
event=PluginInStreamEvent.value_of(data["event"]),
197201
data=data["data"],
198202
reader=self,

0 commit comments

Comments
 (0)