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

Function writeMutedMessageToTerminal

pkg/jobcontroller/jobcontroller.go:1591–1602  ·  view source on GitHub ↗

msg should not have a terminating newline

(blockId string, msg string)

Source from the content-addressed store, hash-verified

1589
1590// msg should not have a terminating newline
1591func writeMutedMessageToTerminal(blockId string, msg string) {
1592 if blockId == "" {
1593 return
1594 }
1595 ctx, cancelFn := context.WithTimeout(context.Background(), DefaultTimeout)
1596 defer cancelFn()
1597 fullMsg := "\x1b[90m" + msg + "\x1b[0m\r\n"
1598 err := doWFSAppend(ctx, waveobj.MakeORef(waveobj.OType_Block, blockId), JobOutputFileName, []byte(fullMsg))
1599 if err != nil {
1600 log.Printf("error writing muted message to terminal (blockid=%s): %v", blockId, err)
1601 }
1602}
1603
1604func writeJobTerminationMessage(ctx context.Context, jobId string, job *waveobj.Job, msg string) {
1605 if job == nil {

Callers 3

HandleCmdJobExitedFunction · 0.85

Calls 2

MakeORefFunction · 0.92
doWFSAppendFunction · 0.85

Tested by

no test coverage detected