mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2025-12-31 20:24:23 +01:00
fix: bug fix related to effect-ts refactor
This commit is contained in:
@@ -118,7 +118,12 @@ const LayerImpl = Effect.gen(function* () {
|
||||
},
|
||||
});
|
||||
|
||||
const sessionInitializedPromise = controllablePromise<string>();
|
||||
const sessionInitializedPromise = controllablePromise<{
|
||||
sessionId: string;
|
||||
}>();
|
||||
const sessionFileCreatedPromise = controllablePromise<{
|
||||
sessionId: string;
|
||||
}>();
|
||||
|
||||
setMessageGeneratorHooks({
|
||||
onNewUserMessageResolved: async (message) => {
|
||||
@@ -194,7 +199,9 @@ const LayerImpl = Effect.gen(function* () {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
sessionInitializedPromise.resolve(message.session_id);
|
||||
sessionInitializedPromise.resolve({
|
||||
sessionId: message.session_id,
|
||||
});
|
||||
|
||||
yield* eventBusService.emit("sessionListChanged", {
|
||||
projectId: processState.def.projectId,
|
||||
@@ -216,6 +223,10 @@ const LayerImpl = Effect.gen(function* () {
|
||||
sessionProcessId: processState.def.sessionProcessId,
|
||||
});
|
||||
|
||||
sessionFileCreatedPromise.resolve({
|
||||
sessionId: message.session_id,
|
||||
});
|
||||
|
||||
yield* virtualConversationDatabase.deleteVirtualConversations(
|
||||
message.session_id,
|
||||
);
|
||||
@@ -329,6 +340,8 @@ const LayerImpl = Effect.gen(function* () {
|
||||
daemonPromise,
|
||||
awaitSessionInitialized: async () =>
|
||||
await sessionInitializedPromise.promise,
|
||||
awaitSessionFileCreated: async () =>
|
||||
await sessionFileCreatedPromise.promise,
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user