Class SessionUiController

java.lang.Object
ai.mindconnect.adminui.ui.controller.SessionUiController

@RestController @RequestMapping("/admin/api") public class SessionUiController extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    SessionUiController(ai.mindconnect.agent.service.AgentSessionService sessionService, ai.mindconnect.agent.service.AgentChatService chatService, ai.mindconnect.agent.port.out.AgentDefinitionRepository agentRepository, ai.mindconnect.agent.port.out.AgentSessionRepository sessionRepository, ai.mindconnect.agent.tools.todo.TodoListService todoListService, ai.mindconnect.agent.tools.workspace.WorkspaceStore workspaceStore, ai.mindconnect.common.Namespace defaultNamespace, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ai.mindconnect.agent.port.out.LlmCallTraceRepository traceRepository, ActiveStreams activeStreams, SessionFileService sessionFiles, AdminLayoutFactory layoutFactory, ai.mindconnect.agent.service.approval.ToolApprovalStore approvalStore)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<?>
    clearTodos(UUID sessionId)
    Resets the session's todo list.
    org.springframework.http.ResponseEntity<?>
    compressMemory(UUID sessionId)
    Compresses unsummarized messages via the configured memory strategy and re-renders the working-memory page with the new (smaller) snapshot, so the operator immediately sees the effect of the compression — fewer tokens, freshly-marked (compressed) entries, etc.
    org.springframework.http.ResponseEntity<byte[]>
    downloadWorkspaceFile(UUID sessionId, String scope, String name, boolean download)
    Streams a single workspace file back to the browser.
    org.springframework.http.ResponseEntity<?>
    getMemory(UUID sessionId, Integer seq, boolean dialog)
     
    org.springframework.http.ResponseEntity<?>
    getTodos(UUID sessionId, boolean dialog)
    Todo-list inspector page.
    org.springframework.http.ResponseEntity<?>
    getTraces(UUID sessionId, UUID turnId, boolean dialog)
    Per-turn LLM call traces.
    org.springframework.http.ResponseEntity<?>
    getWorkspace(UUID sessionId, boolean dialog)
    Workspace browser page — three scopes (SESSION / AGENT_USER / USER) each with a file listing, sizes, and view/download links per file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SessionUiController

      public SessionUiController(ai.mindconnect.agent.service.AgentSessionService sessionService, ai.mindconnect.agent.service.AgentChatService chatService, ai.mindconnect.agent.port.out.AgentDefinitionRepository agentRepository, ai.mindconnect.agent.port.out.AgentSessionRepository sessionRepository, ai.mindconnect.agent.tools.todo.TodoListService todoListService, ai.mindconnect.agent.tools.workspace.WorkspaceStore workspaceStore, ai.mindconnect.common.Namespace defaultNamespace, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ai.mindconnect.agent.port.out.LlmCallTraceRepository traceRepository, ActiveStreams activeStreams, SessionFileService sessionFiles, AdminLayoutFactory layoutFactory, ai.mindconnect.agent.service.approval.ToolApprovalStore approvalStore)
  • Method Details

    • getMemory

      @GetMapping("/sessions/{sessionId}/memory") public org.springframework.http.ResponseEntity<?> getMemory(@PathVariable UUID sessionId, @RequestParam(value="seq",required=false) Integer seq, @RequestParam(value="dialog",defaultValue="false") boolean dialog)
    • compressMemory

      @PostMapping("/sessions/{sessionId}/memory/compress") public org.springframework.http.ResponseEntity<?> compressMemory(@PathVariable UUID sessionId)
      Compresses unsummarized messages via the configured memory strategy and re-renders the working-memory page with the new (smaller) snapshot, so the operator immediately sees the effect of the compression — fewer tokens, freshly-marked (compressed) entries, etc. Returns a full UiPage so the front-end's existing data-action handler swaps the page in place.
    • getTraces

      @GetMapping("/sessions/{sessionId}/traces") public org.springframework.http.ResponseEntity<?> getTraces(@PathVariable UUID sessionId, @RequestParam(value="turnId",required=false) UUID turnId, @RequestParam(value="dialog",defaultValue="false") boolean dialog)
      Per-turn LLM call traces. Without turnId: full master-detail page (most recent turn pre-selected). With turnId: a UiPatch that swaps only the detail pane to show that turn's roundtrips.
    • getTodos

      @GetMapping("/sessions/{sessionId}/todos") public org.springframework.http.ResponseEntity<?> getTodos(@PathVariable UUID sessionId, @RequestParam(value="dialog",defaultValue="false") boolean dialog)
      Todo-list inspector page. Shows the same checklist the LLM is being fed via todo_list_md in its prompt context.
    • clearTodos

      @DeleteMapping("/sessions/{sessionId}/todos") public org.springframework.http.ResponseEntity<?> clearTodos(@PathVariable UUID sessionId)
      Resets the session's todo list. Returns the re-rendered todos page so the operator sees the empty state immediately.
    • getWorkspace

      @GetMapping("/sessions/{sessionId}/workspace") public org.springframework.http.ResponseEntity<?> getWorkspace(@PathVariable UUID sessionId, @RequestParam(value="dialog",defaultValue="false") boolean dialog)
      Workspace browser page — three scopes (SESSION / AGENT_USER / USER) each with a file listing, sizes, and view/download links per file.
    • downloadWorkspaceFile

      @GetMapping("/sessions/{sessionId}/workspace/{scope}/file") public org.springframework.http.ResponseEntity<byte[]> downloadWorkspaceFile(@PathVariable UUID sessionId, @PathVariable String scope, @RequestParam("name") String name, @RequestParam(value="download",defaultValue="false") boolean download)
      Streams a single workspace file back to the browser. scope picks the workspace (session / agent / user), name is the filename. With download=true the response carries a Content-Disposition: attachment so the browser downloads instead of rendering inline.