Skip to content

Commit ed6bc2d

Browse files
committed
make line buffer 1028kb
1 parent 9677c07 commit ed6bc2d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/buffer/buffer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func ProcessResponseAsRingBufferToEnd(httpResp *http.Response, maxJobLogLines in
3232
writeIndex := 0
3333

3434
scanner := bufio.NewScanner(httpResp.Body)
35-
scanner.Buffer(make([]byte, 0, 1024), 1024*1024)
35+
scanner.Buffer(make([]byte, 0, 64*1024), 1024*1024)
3636

3737
for scanner.Scan() {
3838
line := scanner.Text()

pkg/github/actions.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"strconv"
99
"strings"
1010

11-
"github.com/github/github-mcp-server/internal/profiler"
1211
buffer "github.com/github/github-mcp-server/pkg/buffer"
1312
ghErrors "github.com/github/github-mcp-server/pkg/errors"
13+
"github.com/github/github-mcp-server/pkg/profiler"
1414
"github.com/github/github-mcp-server/pkg/translations"
1515
"github.com/google/go-github/v74/github"
1616
"github.com/mark3labs/mcp-go/mcp"
@@ -761,9 +761,9 @@ func downloadLogContent(ctx context.Context, logURL string, tailLines int, maxLi
761761
tailLines = 1000
762762
}
763763

764-
bufferSize := maxLines
765-
if tailLines > maxLines && tailLines <= 5000 {
766-
bufferSize = tailLines
764+
bufferSize := tailLines
765+
if bufferSize > maxLines {
766+
bufferSize = maxLines
767767
}
768768

769769
processedInput, totalLines, httpResp, err := buffer.ProcessResponseAsRingBufferToEnd(httpResp, bufferSize)

0 commit comments

Comments
 (0)