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

Method String

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

242// test failure messages. Without it a MainLoopStop formats as a bare integer,
243// which tells the reader nothing about which exit fired.
244func (s MainLoopStop) String() string {
245 switch s {
246 case StopNone:
247 return "none"
248 case StopMaxRounds:
249 return "max_rounds"
250 case StopEmptyRounds:
251 return "empty_rounds"
252 case StopCompression:
253 return "compression"
254 case StopTokenBudget:
255 return "token_budget"
256 default:
257 return fmt.Sprintf("MainLoopStop(%d)", int(s))
258 }
259}
260
261// Reason is the safe, human-facing sentence for a stop, and the single source of
262// 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
CompletionsWithCtxMethod · 0.45
buildResponsesParamsMethod · 0.45
ExtractTextMethod · 0.45
extractBlockTextFunction · 0.45
buildOpenAIParamsMethod · 0.45
buildAnthropicParamsMethod · 0.45

Calls 1

intFunction · 0.85

Tested by 4

TestNewKeyCmd_CmdLineFunction · 0.36