mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-26 14:15:52 +00:00
refactor: simplify UI labels, optimize agent timeline wrapping, silence proxy errors
This commit is contained in:
@@ -110,10 +110,9 @@ const Cache = () => {
|
||||
</div>
|
||||
|
||||
<div className="mt-6">
|
||||
<button type="button" className="btn btn-sm btn-secondary" onClick={handleResetCache}>
|
||||
Reset Cache
|
||||
<button type="button" className="purge-button" onClick={handleResetCache}>
|
||||
Clear
|
||||
</button>
|
||||
<div className="text-xs mt-1 opacity-70">Destroys all cached agents and their connections.</div>
|
||||
</div>
|
||||
</form>
|
||||
</StyledWrapper>
|
||||
|
||||
@@ -496,10 +496,7 @@ const runSingleRequest = async function (
|
||||
throw new Error('Invalid system https_proxy');
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
// Log system proxy detection errors but continue without proxy
|
||||
console.warn('Failed to configure system proxy:', error.message);
|
||||
}
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
if (!request.httpAgent && !request.httpsAgent) {
|
||||
|
||||
@@ -188,12 +188,9 @@ function getOrCreateAgentInternal<TOptions extends HttpAgentOptions>(
|
||||
return agent;
|
||||
}
|
||||
|
||||
// Wrap the agent class with timeline support (cached)
|
||||
const AgentClass = getTimelineClass(BaseAgentClass);
|
||||
|
||||
const agent = proxyUri
|
||||
? new AgentClass({ ...options, proxy: proxyUri }, timeline || undefined)
|
||||
: new AgentClass(options, timeline || undefined);
|
||||
const AgentClass = timeline ? getTimelineClass(BaseAgentClass) : BaseAgentClass;
|
||||
const agentOptions = proxyUri ? { ...options, proxy: proxyUri } : options;
|
||||
const agent = new AgentClass(agentOptions, timeline ?? undefined);
|
||||
|
||||
if (!disableCache) {
|
||||
// Evict oldest entry if cache is full (LRU eviction)
|
||||
|
||||
Reference in New Issue
Block a user