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

Function buildSlidesReplaceTextRequestsAt

internal/cmd/slides_shared.go:247–270  ·  view source on GitHub ↗
(objectID string, text string, hasExistingText bool, cell *slides.TableCellLocation)

Source from the content-addressed store, hash-verified

245}
246
247func buildSlidesReplaceTextRequestsAt(objectID string, text string, hasExistingText bool, cell *slides.TableCellLocation) []*slides.Request {
248 requests := []*slides.Request{}
249 if hasExistingText {
250 requests = append(requests, &slides.Request{
251 DeleteText: &slides.DeleteTextRequest{
252 CellLocation: cell,
253 ObjectId: objectID,
254 TextRange: &slides.Range{
255 Type: "ALL",
256 },
257 },
258 })
259 }
260 if text != "" {
261 requests = append(requests, &slides.Request{
262 InsertText: &slides.InsertTextRequest{
263 CellLocation: cell,
264 ObjectId: objectID,
265 Text: text,
266 },
267 })
268 }
269 return requests
270}
271
272func buildSlidesClearAndInsertTextRequestsAt(objectID string, text string, cell *slides.TableCellLocation) []*slides.Request {
273 return buildSlidesReplaceTextRequestsAt(objectID, text, true, cell)

Callers 3

RunMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected