feat: improve interactivity by predict sessions

This commit is contained in:
d-kimsuon
2025-10-15 01:18:14 +09:00
parent c7d89d47cd
commit 0259e71b44
15 changed files with 186 additions and 84 deletions

View File

@@ -27,13 +27,13 @@ export const initialize = async (deps: {
console.log("Initializing sessions cache");
const results = await Promise.all(
projects.map((project) => deps.sessionRepository.getSessions(project.id))
projects.map((project) => deps.sessionRepository.getSessions(project.id)),
);
console.log(
`${results.reduce(
(s, { sessions }) => s + sessions.length,
0
)} sessions cache initialized`
0,
)} sessions cache initialized`,
);
} catch {
// do nothing

View File

@@ -337,7 +337,6 @@ export const routes = async (app: HonoAppType) => {
return c.json({
taskId: task.id,
sessionId: task.sessionId,
userMessageId: task.userMessageId,
});
},
)
@@ -373,7 +372,6 @@ export const routes = async (app: HonoAppType) => {
return c.json({
taskId: task.id,
sessionId: task.sessionId,
userMessageId: task.userMessageId,
});
},
)
@@ -385,7 +383,6 @@ export const routes = async (app: HonoAppType) => {
id: task.id,
status: task.status,
sessionId: task.sessionId,
userMessageId: task.userMessageId,
}),
),
});