fix: 4 pre-release bug fixes — identity override, model config, agent sync, auto-identity
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
P1: identity.rs get_identity() returns empty soul/instructions for agents without explicit identity files. This prevents the default ZCLAW personality from overriding agent_config.system_prompt. New get_identity_or_default() method added for the DEFAULT agent. P2: messaging.rs now uses agent_config.model.model when available, falling back to global Kernel config. This allows per-agent model selection. P2: agentStore.ts loadClones retries up to 3 times (300ms interval) when getClient() returns null, handling the coordinator initialization race. P2: agent_create Tauri command auto-populates identity files (soul + instructions) from creation parameters, ensuring build_system_prompt() has content for new agents. Also fixes conversationStore upsertActiveConversation to persist generated conversation IDs, preventing duplicate entries on new conversations.
This commit is contained in:
@@ -41,9 +41,12 @@ impl Kernel {
|
||||
// Create or get session
|
||||
let session_id = self.memory.create_session(agent_id).await?;
|
||||
|
||||
// Always use Kernel's current model configuration
|
||||
// This ensures user's "模型与 API" settings are respected
|
||||
let model = self.config.model().to_string();
|
||||
// Use agent-level model if configured, otherwise fall back to global config
|
||||
let model = if !agent_config.model.model.is_empty() {
|
||||
agent_config.model.model.clone()
|
||||
} else {
|
||||
self.config.model().to_string()
|
||||
};
|
||||
|
||||
// Create agent loop with model configuration
|
||||
let subagent_enabled = chat_mode.as_ref().and_then(|m| m.subagent_enabled).unwrap_or(false);
|
||||
@@ -147,9 +150,12 @@ impl Kernel {
|
||||
None => self.memory.create_session(agent_id).await?,
|
||||
};
|
||||
|
||||
// Always use Kernel's current model configuration
|
||||
// This ensures user's "模型与 API" settings are respected
|
||||
let model = self.config.model().to_string();
|
||||
// Use agent-level model if configured, otherwise fall back to global config
|
||||
let model = if !agent_config.model.model.is_empty() {
|
||||
agent_config.model.model.clone()
|
||||
} else {
|
||||
self.config.model().to_string()
|
||||
};
|
||||
|
||||
// Create agent loop with model configuration
|
||||
let subagent_enabled = chat_mode.as_ref().and_then(|m| m.subagent_enabled).unwrap_or(false);
|
||||
|
||||
Reference in New Issue
Block a user