MCPcopy
hub / github.com/wavetermdev/waveterm / WaveAIGetToolDiffCommand

Method WaveAIGetToolDiffCommand

pkg/wshrpc/wshserver/wshserver.go:1302–1312  ·  view source on GitHub ↗
(ctx context.Context, data wshrpc.CommandWaveAIGetToolDiffData)

Source from the content-addressed store, hash-verified

1300}
1301
1302func (ws *WshServer) WaveAIGetToolDiffCommand(ctx context.Context, data wshrpc.CommandWaveAIGetToolDiffData) (*wshrpc.CommandWaveAIGetToolDiffRtnData, error) {
1303 originalContent, modifiedContent, err := aiusechat.CreateWriteTextFileDiff(ctx, data.ChatId, data.ToolCallId)
1304 if err != nil {
1305 return nil, err
1306 }
1307
1308 return &wshrpc.CommandWaveAIGetToolDiffRtnData{
1309 OriginalContents64: base64.StdEncoding.EncodeToString(originalContent),
1310 ModifiedContents64: base64.StdEncoding.EncodeToString(modifiedContent),
1311 }, nil
1312}
1313
1314var wshActivityRe = regexp.MustCompile(`^[a-z:#]+$`)
1315

Callers

nothing calls this directly

Calls 1

CreateWriteTextFileDiffFunction · 0.92

Tested by

no test coverage detected