feat: fix CI and format + refactor

This commit is contained in:
Ralph Khreish
2025-08-28 17:17:51 +02:00
parent 0cbb0b6a9f
commit 00eb71dce8
10 changed files with 140 additions and 91 deletions

View File

@@ -427,6 +427,19 @@ function getResearchProvider(explicitRoot = null) {
return getModelConfigForRole('research', explicitRoot).provider;
}
/**
* Check if Claude Code is being used as the provider
* @param {boolean} useResearch - Whether to check research provider or main provider
* @param {string|null} projectRoot - Project root path (optional)
* @returns {boolean} True if Claude Code is the current provider
*/
function isClaudeCode(useResearch = false, projectRoot = null) {
const currentProvider = useResearch
? getResearchProvider(projectRoot)
: getMainProvider(projectRoot);
return currentProvider === CUSTOM_PROVIDERS.CLAUDE_CODE;
}
function getResearchModelId(explicitRoot = null) {
return getModelConfigForRole('research', explicitRoot).modelId;
}
@@ -983,6 +996,7 @@ export {
getResearchModelId,
getResearchMaxTokens,
getResearchTemperature,
isClaudeCode,
getFallbackProvider,
getFallbackModelId,
getFallbackMaxTokens,