mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2026-01-06 15:14:21 +01:00
feat: improve interactivity by predict sessions
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user