Skip to content

Commit 9920341

Browse files
committed
style: gofmt -s formatting
1 parent 85b7bf3 commit 9920341

4 files changed

Lines changed: 33 additions & 33 deletions

File tree

chunker.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ const (
3030
type ChunkOptions struct {
3131
MaxTokens int
3232
MinTokens int
33-
MinChunkSize int // hard minimum; chunks below this get heavy DP penalty (default: DefaultMinChunkSize)
33+
MinChunkSize int // hard minimum; chunks below this get heavy DP penalty (default: DefaultMinChunkSize)
3434
Language string
35-
Overlap int // number of tokens worth of content to repeat from previous chunk
36-
KeepSeparator SeparatorKeep // controls boundary line placement (default: SepLeft)
35+
Overlap int // number of tokens worth of content to repeat from previous chunk
36+
KeepSeparator SeparatorKeep // controls boundary line placement (default: SepLeft)
3737
}
3838

3939
// DefaultMinChunkSize is the default minimum chunk size in tokens.
@@ -96,12 +96,12 @@ func GetLanguagePatterns(lang string) []string {
9696
// ---- Feature 1: Six-Level Separator Hierarchy ----
9797

9898
var separatorLevels = []string{
99-
"\n\n", // Level 1: paragraph breaks
100-
"\n", // Level 2: line breaks
99+
"\n\n", // Level 1: paragraph breaks
100+
"\n", // Level 2: line breaks
101101
". ", "? ", "! ", "。", "?", "!", // Level 3: sentence endings (incl CJK)
102-
"; ", ": ", "— ", ";", ":", // Level 4: clause breaks
103-
", ", ",", // Level 5: comma breaks
104-
" ", // Level 6: word breaks
102+
"; ", ": ", "— ", ";", ":", // Level 4: clause breaks
103+
", ", ",", // Level 5: comma breaks
104+
" ", // Level 6: word breaks
105105
}
106106

107107
// separatorsByLevel groups separators into their hierarchical levels.

internal/filter/compaction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type summaryResponse struct {
2626
Tokens int
2727
}
2828

29-
func newSummarizer() *summarizer { return &summarizer{} }
29+
func newSummarizer() *summarizer { return &summarizer{} }
3030
func (s *summarizer) IsAvailable() bool { return false }
3131
func (s *summarizer) SummarizeWithRequest(req summaryRequest) (summaryResponse, error) {
3232
return summaryResponse{Summary: req.Content, Tokens: len(req.Content) / 4}, nil

internal/filter/pipeline_process.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,23 @@ func (p *PipelineCoordinator) runGuardrailFallback(input string) (string, *Pipel
7272
Mode: ModeMinimal,
7373
EnableQualityGuardrail: false, // prevent infinite recursion
7474
QueryIntent: p.config.QueryIntent,
75-
Budget: p.config.Budget,
76-
LLMEnabled: p.config.LLMEnabled,
77-
SessionTracking: p.config.SessionTracking,
78-
NgramEnabled: p.config.NgramEnabled,
79-
MultiFileEnabled: p.config.MultiFileEnabled,
80-
EnableEntropy: p.config.EnableEntropy,
81-
EnablePerplexity: p.config.EnablePerplexity,
82-
EnableAST: p.config.EnableAST,
83-
EnableGist: p.config.EnableGist,
84-
EnableHierarchical: p.config.EnableHierarchical,
85-
EnableCompaction: p.config.EnableCompaction,
86-
EnableAttribution: p.config.EnableAttribution,
87-
EnableH2O: p.config.EnableH2O,
88-
EnableAttentionSink: p.config.EnableAttentionSink,
89-
EnableTOMLFilter: p.config.EnableTOMLFilter,
90-
CacheEnabled: p.config.CacheEnabled,
91-
CacheMaxSize: p.config.CacheMaxSize,
75+
Budget: p.config.Budget,
76+
LLMEnabled: p.config.LLMEnabled,
77+
SessionTracking: p.config.SessionTracking,
78+
NgramEnabled: p.config.NgramEnabled,
79+
MultiFileEnabled: p.config.MultiFileEnabled,
80+
EnableEntropy: p.config.EnableEntropy,
81+
EnablePerplexity: p.config.EnablePerplexity,
82+
EnableAST: p.config.EnableAST,
83+
EnableGist: p.config.EnableGist,
84+
EnableHierarchical: p.config.EnableHierarchical,
85+
EnableCompaction: p.config.EnableCompaction,
86+
EnableAttribution: p.config.EnableAttribution,
87+
EnableH2O: p.config.EnableH2O,
88+
EnableAttentionSink: p.config.EnableAttentionSink,
89+
EnableTOMLFilter: p.config.EnableTOMLFilter,
90+
CacheEnabled: p.config.CacheEnabled,
91+
CacheMaxSize: p.config.CacheMaxSize,
9292
}
9393
fallback := NewPipelineCoordinator(fallbackCfg)
9494
return fallback.Process(input)

stream.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import (
1212
// snapshot is always available without blocking.
1313
type StreamCompressor struct {
1414
mu sync.RWMutex
15-
raw []string // accumulated raw segments
16-
compressed string // latest compressed output (ready to read)
17-
stats Stats // stats from last compression
18-
opts []Option // compression options
19-
threshold int // re-compress when raw tokens exceed this
20-
dirty bool // new content since last compression
21-
compressing bool // background compression in progress
15+
raw []string // accumulated raw segments
16+
compressed string // latest compressed output (ready to read)
17+
stats Stats // stats from last compression
18+
opts []Option // compression options
19+
threshold int // re-compress when raw tokens exceed this
20+
dirty bool // new content since last compression
21+
compressing bool // background compression in progress
2222
done chan struct{}
2323
wg sync.WaitGroup // tracks in-progress compression goroutines
2424
}

0 commit comments

Comments
 (0)