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

Method String

internal/llmloop/loop.go:280–293  ·  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

278// test failure messages. Without it a MainLoopStop formats as a bare integer,
279// which tells the reader nothing about which exit fired.
280func (s MainLoopStop) String() string {
281 switch s {
282 case StopNone:
283 return "none"
284 case StopMaxRounds:
285 return "max_rounds"
286 case StopEmptyRounds:
287 return "empty_rounds"
288 case StopCompression:
289 return "compression"
290 default:
291 return fmt.Sprintf("MainLoopStop(%d)", int(s))
292 }
293}
294
295// Reason is the safe, human-facing sentence for a stop, and the single source of
296// truth for it: the diff-review manifest reason and the scan subtask warning

Callers 15

resolveKeyCmdFunction · 0.45
TestNewKeyCmd_CmdLineFunction · 0.45
newRawMiddlewareFunction · 0.45
splitHeaderPairsFunction · 0.45
buildResponsesParamsMethod · 0.45
ExtractTextMethod · 0.45
extractBlockTextFunction · 0.45
buildOpenAIParamsMethod · 0.45
buildAnthropicParamsMethod · 0.45
captureToolTerminalFunction · 0.45

Calls

no outgoing calls

Tested by 5

TestNewKeyCmd_CmdLineFunction · 0.36
captureToolTerminalFunction · 0.36