Skip to content

Commit adbf730

Browse files
authored
feat: move preview to block request (#429)
1 parent 021b086 commit adbf730

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

oocana/oocana/context.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,14 @@ def preview(self, payload: PreviewPayload, id: str | None = None):
580580
if id is not None:
581581
payload_internal["id"] = id #type: ignore
582582

583-
self.__mainframe.report(
584-
self.block_info,
583+
request_id = random_string(16)
584+
self.__mainframe.send(
585+
self.job_info,
585586
{
586-
"type": "BlockPreview",
587+
"type": "BlockRequest",
588+
"action": "Preview",
587589
"payload": payload_internal, # type: ignore
590+
"request_id": request_id,
588591
},
589592
)
590593

0 commit comments

Comments
 (0)