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

Method StripInternal

codersdk/chats.go:355–365  ·  view source on GitHub ↗

StripInternal removes internal-only fields that must not be sent to API clients. Call before publishing via REST or SSE. Note: ArgsDelta, ResultDelta, and ResultReset are intentionally preserved. They are streaming-only fields consumed by the frontend via SSE message_part events. ArgsDelta is produ

()

Source from the content-addressed store, hash-verified

353// chatloop; ResultDelta and ResultReset are produced by the advisor
354// streaming callbacks in chatd.
355func (p *ChatMessagePart) StripInternal() {
356 p.ProviderMetadata = nil
357 if p.FileID.Valid {
358 p.Data = nil
359 }
360 p.ContextFileContent = ""
361 p.ContextFileOS = ""
362 p.ContextFileDirectory = ""
363 p.SkillDir = ""
364 p.ContextFileSkillMetaFile = ""
365}
366
367// ChatMessageText builds a text chat message part.
368func ChatMessageText(text string) ChatMessagePart {

Callers 6

chatMessagePartsFunction · 0.80
publishMessagePartMethod · 0.80
filterSkillPartsFunction · 0.80
BuildLastInjectedContextFunction · 0.80

Calls

no outgoing calls

Tested by 1