MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / writeSessionSeparatorToTerminal

Function writeSessionSeparatorToTerminal

pkg/jobcontroller/jobcontroller.go:1574–1588  ·  view source on GitHub ↗
(blockId string, termWidth int)

Source from the content-addressed store, hash-verified

1572}
1573
1574func writeSessionSeparatorToTerminal(blockId string, termWidth int) {
1575 if blockId == "" {
1576 return
1577 }
1578 ctx, cancelFn := context.WithTimeout(context.Background(), DefaultTimeout)
1579 defer cancelFn()
1580 if isFileEmpty(ctx, blockId) {
1581 return
1582 }
1583 separatorLine := "\r\n"
1584 err := doWFSAppend(ctx, waveobj.MakeORef(waveobj.OType_Block, blockId), JobOutputFileName, []byte(separatorLine))
1585 if err != nil {
1586 log.Printf("error writing session separator to terminal (blockid=%s): %v", blockId, err)
1587 }
1588}
1589
1590// msg should not have a terminating newline
1591func writeMutedMessageToTerminal(blockId string, msg string) {

Callers 1

StartJobFunction · 0.85

Calls 3

MakeORefFunction · 0.92
isFileEmptyFunction · 0.85
doWFSAppendFunction · 0.85

Tested by

no test coverage detected