mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
fix(sse): repair RTK engine defaults so dedup and direct calls work (#2825)
Integrated into release/v3.8.6
This commit is contained in:
@@ -316,13 +316,11 @@ export function processRtkText(
|
||||
}
|
||||
}
|
||||
|
||||
if (config.intensity !== "minimal") {
|
||||
const deduped = deduplicateRepeatedLines(result, { threshold: config.deduplicateThreshold });
|
||||
if (deduped.collapsed > 0) {
|
||||
result = deduped.text;
|
||||
techniquesUsed.push("rtk-dedup");
|
||||
rulesApplied.push("rtk:dedup");
|
||||
}
|
||||
const deduped = deduplicateRepeatedLines(result, { threshold: config.deduplicateThreshold });
|
||||
if (deduped.collapsed > 0) {
|
||||
result = deduped.text;
|
||||
techniquesUsed.push("rtk-dedup");
|
||||
rulesApplied.push("rtk:dedup");
|
||||
}
|
||||
|
||||
const truncated = smartTruncate(result, {
|
||||
@@ -441,7 +439,10 @@ export function applyRtkCompression(
|
||||
options.stepConfig && options.stepConfig.enabled === undefined
|
||||
? { enabled: true, ...options.stepConfig }
|
||||
: options.stepConfig;
|
||||
const config = mergeRtkConfig(options.config, stepConfig);
|
||||
const explicitConfig = options.config && Object.keys(options.config).length > 0;
|
||||
const baseConfig =
|
||||
!explicitConfig && !stepConfig ? { enabled: true } : (options.config ?? {});
|
||||
const config = mergeRtkConfig(baseConfig, stepConfig);
|
||||
if (!config.enabled) return { body, compressed: false, stats: null };
|
||||
|
||||
const adapter = adaptBodyForCompression(body);
|
||||
|
||||
Reference in New Issue
Block a user