mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
feat: add immediate context compaction API, UI button, and /compact slash command
- Add POST /bots/:bot_id/sessions/:session_id/compact endpoint for synchronous context compaction with fallback to chat model when no dedicated compaction model is configured - Add "Compact Now" button to session info panel in the web UI - Add /compact slash command for triggering compaction from chat - Regenerate OpenAPI spec and TypeScript SDK
This commit is contained in:
+5
-2
@@ -337,6 +337,7 @@ func provideChannelRouter(
|
||||
emailService *emailpkg.Service,
|
||||
emailOutboxService *emailpkg.OutboxService,
|
||||
heartbeatService *heartbeat.Service,
|
||||
compactionService *compaction.Service,
|
||||
queries *dbsqlc.Queries,
|
||||
containerdHandler *handlers.ContainerdHandler,
|
||||
manager *workspace.Manager,
|
||||
@@ -366,7 +367,7 @@ func provideChannelRouter(
|
||||
processor.SetStreamObserver(local.NewRouteHubBroadcaster(hub))
|
||||
processor.SetDispatcher(inbound.NewRouteDispatcher(log))
|
||||
processor.SetTtsService(ttsService, &settingsTtsModelResolver{settings: settingsService})
|
||||
processor.SetCommandHandler(command.NewHandler(
|
||||
cmdHandler := command.NewHandler(
|
||||
log,
|
||||
&command.BotMemberRoleAdapter{BotService: botService},
|
||||
scheduleService,
|
||||
@@ -384,7 +385,9 @@ func provideChannelRouter(
|
||||
aclService,
|
||||
&commandSkillLoaderAdapter{handler: containerdHandler},
|
||||
&commandContainerFSAdapter{manager: manager},
|
||||
))
|
||||
)
|
||||
cmdHandler.SetCompactionService(compactionService, queries)
|
||||
processor.SetCommandHandler(cmdHandler)
|
||||
return processor
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user