@vibe-lark/larkpal 0.1.71 → 0.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.mjs +7 -1
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -3708,6 +3708,7 @@ function findChatRunByRunId(runId) {
|
|
|
3708
3708
|
}
|
|
3709
3709
|
function serializeChatRun(run) {
|
|
3710
3710
|
const idleSeconds = Math.max(0, Math.floor((Date.now() - run.lastEventAt) / 1e3));
|
|
3711
|
+
const processStatus = getSerializableRunProcessStatus(run);
|
|
3711
3712
|
return {
|
|
3712
3713
|
runId: run.runId,
|
|
3713
3714
|
sessionId: run.sessionId,
|
|
@@ -3726,10 +3727,15 @@ function serializeChatRun(run) {
|
|
|
3726
3727
|
lastToolName: run.lastToolName,
|
|
3727
3728
|
idleSeconds,
|
|
3728
3729
|
adapterBusy: run.status === "running" ? run.adapterBusy : false,
|
|
3729
|
-
processStatus
|
|
3730
|
+
processStatus,
|
|
3730
3731
|
staleReason: run.staleReason
|
|
3731
3732
|
};
|
|
3732
3733
|
}
|
|
3734
|
+
function getSerializableRunProcessStatus(run) {
|
|
3735
|
+
if (run.status === "running") return run.processStatus;
|
|
3736
|
+
if (run.processStatus === "running" || run.processStatus === "starting") return void 0;
|
|
3737
|
+
return run.processStatus;
|
|
3738
|
+
}
|
|
3733
3739
|
function serializeRuntimeProcessInfo(processInfo, processManager) {
|
|
3734
3740
|
return {
|
|
3735
3741
|
...processInfo,
|