MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / Submit

Method Submit

backend/session.go:196–230  ·  view source on GitHub ↗
(ctx context.Context, input string)

Source from the content-addressed store, hash-verified

194 seq atomic.Int64
195}
196
197func NewSessionController(sessionID string, cfg config.Config, engine *agent.QueryEngine, state *agent.AgentState, store *session.Store, emit func(PushEvent)) *SessionController {
198 controller := &SessionController{
199 id: sessionID,
200 cfg: cfg,
201 engine: engine,
202 store: store,
203 state: state,
204 }
205 controller.bridge = NewWSRendererBridge(sessionID, emit, controller.nextSeq)
206 controller.ui = luminaui.NewUiRuntime(engine, controller.bridge)
207 if engine != nil && engine.CoreEngine != nil {
208 engine.CoreEngine.StateObserver = controller.observeState
209 }
210 return controller
211}
212
213func (c *SessionController) ID() string {
214 return c.id
215}
216
217func (c *SessionController) RuntimeConfig() config.Config {
218 c.stateMu.Lock()
219 state := c.state
220 c.stateMu.Unlock()
221 cfg := c.cfg
222 if state != nil && state.YoloEnabled() {
223 cfg.Yolo = true
224 }
225 return cfg
226}
227
228func (c *SessionController) Mount() {
229 c.stateMu.Lock()
230 state := c.state
231 c.stateMu.Unlock()
232 c.ui.MountStateSnapshot(state)
233}

Callers 1

dispatchResultMethod · 0.80

Calls 5

emitStatusMethod · 0.95
SaveMethod · 0.95
SnapshotMethod · 0.95
RunSubmitMessageMethod · 0.80
emitEventMethod · 0.80

Tested by

no test coverage detected