context window fuel gauge auto update fix
This commit is contained in:
parent
00969cf9bc
commit
2483161663
@ -1,6 +1,6 @@
|
|||||||
import { createContext } from "react";
|
import { createContext } from "react";
|
||||||
import { io, Socket } from "socket.io-client";
|
import { io, Socket } from "socket.io-client";
|
||||||
import type { ChatSession } from "./api";
|
import type { ChatSession, IWorkOrderCompleteStats } from "./api";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Web Worker for heartbeat timing — avoids browser tab throttling.
|
* Web Worker for heartbeat timing — avoids browser tab throttling.
|
||||||
@ -30,6 +30,7 @@ export interface ServerToClientEvents {
|
|||||||
turnId: string,
|
turnId: string,
|
||||||
success: boolean,
|
success: boolean,
|
||||||
message?: string,
|
message?: string,
|
||||||
|
stats?: IWorkOrderCompleteStats,
|
||||||
) => void;
|
) => void;
|
||||||
log: (
|
log: (
|
||||||
timestamp: string,
|
timestamp: string,
|
||||||
@ -90,6 +91,7 @@ export interface SocketEvents {
|
|||||||
turnId: string,
|
turnId: string,
|
||||||
success: boolean,
|
success: boolean,
|
||||||
message?: string,
|
message?: string,
|
||||||
|
stats?: IWorkOrderCompleteStats,
|
||||||
) => void;
|
) => void;
|
||||||
"agent:thinking": (data: { agentId: string; thinking: string }) => void;
|
"agent:thinking": (data: { agentId: string; thinking: string }) => void;
|
||||||
"agent:response": (data: { agentId: string; chunk: string }) => void;
|
"agent:response": (data: { agentId: string; chunk: string }) => void;
|
||||||
@ -228,8 +230,8 @@ class SocketClient {
|
|||||||
|
|
||||||
this.socket.on(
|
this.socket.on(
|
||||||
"workOrderComplete",
|
"workOrderComplete",
|
||||||
(turnId: string, success: boolean, message?: string) => {
|
(turnId: string, success: boolean, message?: string, stats?: IWorkOrderCompleteStats) => {
|
||||||
this.emit("workOrderComplete", turnId, success, message);
|
this.emit("workOrderComplete", turnId, success, message, stats);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user