mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-10 07:19:02 +08:00
refactor: update API configuration handling and improve logging level
This commit is contained in:
parent
781b01ee17
commit
e02f826707
@ -68,11 +68,7 @@ class ClaudeCodeService implements AgentServiceInterface {
|
|||||||
return aiStream
|
return aiStream
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: use cherry studio api server config instead of direct provider config to provide more flexibility (e.g. custom headers, proxy, statistics, etc).
|
|
||||||
const apiConfig = await apiConfigService.get()
|
const apiConfig = await apiConfigService.get()
|
||||||
// process.env.ANTHROPIC_AUTH_TOKEN = apiConfig.apiKey
|
|
||||||
// process.env.ANTHROPIC_BASE_URL = `http://${apiConfig.host}:${apiConfig.port}`
|
|
||||||
|
|
||||||
const loginShellEnv = await getLoginShellEnvironment()
|
const loginShellEnv = await getLoginShellEnvironment()
|
||||||
const env = {
|
const env = {
|
||||||
...loginShellEnv,
|
...loginShellEnv,
|
||||||
@ -126,7 +122,7 @@ class ClaudeCodeService implements AgentServiceInterface {
|
|||||||
options.resume = lastAgentSessionId
|
options.resume = lastAgentSessionId
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.silly('Starting Claude Code SDK query', {
|
logger.info('Starting Claude Code SDK query', {
|
||||||
prompt,
|
prompt,
|
||||||
cwd: options.cwd,
|
cwd: options.cwd,
|
||||||
model: options.model,
|
model: options.model,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user