MCPcopy Create free account
hub / github.com/openclaw/gogcli / dryRunPayload

Method dryRunPayload

internal/cmd/docs_edit.go:888–913  ·  view source on GitHub ↗
(docID string, written int, replacing bool, replaceStart, replaceEnd int64, at string)

Source from the content-addressed store, hash-verified

886}
887
888func (c *DocsUpdateCmd) dryRunPayload(docID string, written int, replacing bool, replaceStart, replaceEnd int64, at string) map[string]any {
889 var index any = docsAtIndexEnd
890 switch {
891 case replacing:
892 index = replaceStart
893 case at != "":
894 index = docsAtIndexAnchorStart
895 case c.Index > 0:
896 index = c.Index
897 }
898 payload := map[string]any{
899 "document_id": docID,
900 "written": written,
901 "index": index,
902 "markdown": c.Markdown,
903 "pageless": c.Pageless,
904 "tab": c.Tab,
905 "segment": c.Segment,
906 "batch": c.Batch,
907 }
908 if replacing {
909 payload["replaceRange"] = map[string]int64{"start": replaceStart, "end": replaceEnd}
910 }
911 addDocsAtAnchorDryRunPayload(payload, docsAtAnchorFlags{At: at, Occurrence: c.Occurrence, MatchCase: c.MatchCase})
912 return payload
913}
914
915type DocsInsertCmd struct {
916 DocID string `arg:"" name:"docId" help:"Doc ID"`

Callers 15

RunMethod · 0.95
dryRunRequestMethod · 0.45
dryRunRequestMethod · 0.45
RunMethod · 0.45
writePlainTextMethod · 0.45
writePlainTextResultMethod · 0.45
appendMarkdownMethod · 0.45
RunMethod · 0.45

Calls 1