MCPcopy Create free account
hub / github.com/alibaba/open-code-review / String

Method String

internal/llmloop/loop.go:234–247  ·  view source on GitHub ↗

String names the stop for diagnostics — telemetry attributes, log lines and test failure messages. Without it a MainLoopStop formats as a bare integer, which tells the reader nothing about which exit fired.

()

Source from the content-addressed store, hash-verified

232// test failure messages. Without it a MainLoopStop formats as a bare integer,
233// which tells the reader nothing about which exit fired.
234func (s MainLoopStop) String() string {
235 switch s {
236 case StopNone:
237 return "none"
238 case StopMaxRounds:
239 return "max_rounds"
240 case StopEmptyRounds:
241 return "empty_rounds"
242 case StopCompression:
243 return "compression"
244 default:
245 return fmt.Sprintf("MainLoopStop(%d)", int(s))
246 }
247}
248
249// Reason is the safe, human-facing sentence for a stop, and the single source of
250// truth for it: the diff-review manifest reason and the scan subtask warning

Callers 12

resolveKeyCmdFunction · 0.45
TestNewKeyCmd_CmdLineFunction · 0.45
splitHeaderPairsFunction · 0.45
buildResponsesParamsMethod · 0.45
ExtractTextMethod · 0.45
extractBlockTextFunction · 0.45
buildOpenAIParamsMethod · 0.45
buildAnthropicParamsMethod · 0.45
buildMessageXMLFunction · 0.45

Calls

no outgoing calls

Tested by 3

TestNewKeyCmd_CmdLineFunction · 0.36