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

Method MountStateSnapshot

ui/runtime.go:142–158  ·  view source on GitHub ↗
(state *agent.AgentState)

Source from the content-addressed store, hash-verified

140}
141
142func (r *UiRuntime) MountStateSnapshot(state *agent.AgentState) {
143 r.CurrentState = state
144 r.Frame = NewRenderFrame()
145 r.Frame.TranscriptEntries = TranscriptEntriesFromState(state)
146 r.Frame.InputEnabled = true
147 r.Frame.InputMode = "normal"
148 r.Frame.InputPlaceholder = "请输入消息并回车。"
149 r.refreshContextWindowFrame()
150 if preparer, ok := r.UI.(RuntimePreparer); ok {
151 preparer.PrepareRuntime()
152 }
153 if r.UI != nil {
154 r.UI.Mount(r.Frame)
155 r.Mounted = true
156 }
157 r.Dirty = false
158}
159
160func TranscriptEntriesFromState(state *agent.AgentState) []map[string]any {
161 if state == nil {

Callers 6

runREPLFunction · 0.95
MountMethod · 0.80
ClearMethod · 0.80
CompactMethod · 0.80
ToggleYoloMethod · 0.80

Calls 5

NewRenderFrameFunction · 0.85
PrepareRuntimeMethod · 0.65
MountMethod · 0.65