MCPcopy Index your code
hub / github.com/coder/coder / clearCachedWorkspaceState

Method clearCachedWorkspaceState

coderd/x/chatd/chatd.go:686–699  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

684}
685
686func (c *turnWorkspaceContext) clearCachedWorkspaceState() {
687 c.mu.Lock()
688 releaseConn := c.releaseConn
689 c.agent = database.WorkspaceAgent{}
690 c.agentLoaded = false
691 c.conn = nil
692 c.releaseConn = nil
693 c.cachedWorkspaceID = uuid.NullUUID{}
694 c.mu.Unlock()
695
696 if releaseConn != nil {
697 releaseConn()
698 }
699}
700
701func (c *turnWorkspaceContext) setCurrentChat(chat database.Chat) {
702 c.chatStateMu.Lock()

Callers 4

closeMethod · 0.95
selectWorkspaceMethod · 0.95
getWorkspaceConnMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected