fix: memory scope_id column overflow and API read mismatch
AgentRuntime writes scope_id as {user_id}:{agent_id} (73 chars) but:
- DB columns were CHAR(36)/VARCHAR(36), causing Data too long errors
- Memory API queried with agent_id only, returning empty results
- Add _mem_scope() helper to build correct scope_id format
- Update all CRUD queries in agent_memory.py to use _mem_scope()
- Enhance login failure logging in auth.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,39 @@ fun LoginScreen(
|
||||
|
||||
// Server URL
|
||||
if (isEditingUrl) {
|
||||
// Preset quick-select buttons
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
val isLocalSelected = editedUrl == "http://192.168.31.135:8037"
|
||||
val isCloudSelected = editedUrl == "http://101.43.95.130:8037"
|
||||
OutlinedButton(
|
||||
onClick = { editedUrl = "http://192.168.31.135:8037" },
|
||||
colors = if (isLocalSelected) {
|
||||
ButtonDefaults.outlinedButtonColors(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer
|
||||
)
|
||||
} else {
|
||||
ButtonDefaults.outlinedButtonColors()
|
||||
}
|
||||
) {
|
||||
Text("本地")
|
||||
}
|
||||
OutlinedButton(
|
||||
onClick = { editedUrl = "http://101.43.95.130:8037" },
|
||||
colors = if (isCloudSelected) {
|
||||
ButtonDefaults.outlinedButtonColors(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer
|
||||
)
|
||||
} else {
|
||||
ButtonDefaults.outlinedButtonColors()
|
||||
}
|
||||
) {
|
||||
Text("云服务")
|
||||
}
|
||||
}
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
OutlinedTextField(
|
||||
value = editedUrl,
|
||||
onValueChange = { editedUrl = it },
|
||||
@@ -84,7 +117,7 @@ fun LoginScreen(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
|
||||
enabled = !uiState.isLoading,
|
||||
supportingText = { Text("输入后点击保存,设置即时生效") }
|
||||
supportingText = { Text("点击上方快捷选择,或手动输入后保存") }
|
||||
)
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
|
||||
Reference in New Issue
Block a user