Merge remote-tracking branch 'web/master' into feat/pixel_art2
This commit is contained in:
@@ -815,10 +815,11 @@ export function App({
|
||||
[gameChatOnly],
|
||||
);
|
||||
|
||||
function updateProjectSupervisorResponseStream(
|
||||
const updateProjectSupervisorResponseStream = useCallback(
|
||||
(
|
||||
incoming: AgentRuntimeResponseStream | null | undefined,
|
||||
runtime: AgentRuntimeState,
|
||||
) {
|
||||
) => {
|
||||
let nextStream = mergeProjectSupervisorResponseStream(
|
||||
projectSupervisorResponseStreamRef.current,
|
||||
incoming,
|
||||
@@ -827,9 +828,8 @@ export function App({
|
||||
const candidateStream = nextStream;
|
||||
if (candidateStream?.status === 'ready' && gameChatOnly) {
|
||||
const text = candidateStream.accumulatedText.trim();
|
||||
const responseKey = projectSupervisorResponseStreamIdentity(
|
||||
candidateStream,
|
||||
);
|
||||
const responseKey =
|
||||
projectSupervisorResponseStreamIdentity(candidateStream);
|
||||
const messageId = `runtime-response:${responseKey}`;
|
||||
const alreadyCommitted =
|
||||
gameChatCommittedResponseStreamKeysRef.current.has(responseKey) ||
|
||||
@@ -875,7 +875,9 @@ export function App({
|
||||
}
|
||||
projectSupervisorResponseStreamRef.current = nextStream;
|
||||
setProjectSupervisorResponseStream(nextStream);
|
||||
}
|
||||
},
|
||||
[gameChatOnly],
|
||||
);
|
||||
|
||||
function resetProjectSupervisorState() {
|
||||
projectSupervisorHistoryLoadVersionRef.current += 1;
|
||||
@@ -1155,7 +1157,7 @@ export function App({
|
||||
disposed = true;
|
||||
cleanup?.();
|
||||
};
|
||||
}, [updateProjectSupervisorRuntime]);
|
||||
}, [updateProjectSupervisorResponseStream, updateProjectSupervisorRuntime]);
|
||||
|
||||
useEffect(() => {
|
||||
const invoke = resolveTauriInvoke();
|
||||
|
||||
@@ -8,12 +8,12 @@ import type {
|
||||
} from '../src/app/types';
|
||||
import {
|
||||
formatAgentRuntimeEvent,
|
||||
mergeGameChatRuntimeResponseMessagesIntoHistory,
|
||||
projectRuntimeVisibleCurrentWork,
|
||||
projectRuntimeVisibleError,
|
||||
projectSupervisorChatRuntimeStatus,
|
||||
projectSupervisorResponseStreamIdentity,
|
||||
projectSupervisorVisibleConversationText,
|
||||
mergeGameChatRuntimeResponseMessagesIntoHistory,
|
||||
submitProjectSupervisorRuntimeTask,
|
||||
} from '../src/features/agent-runtime/model';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user