generated from nhcarrigan/template
fix: resolve critical runtime errors blocking permission modal
This fixes two severe bugs: 1. Missing debugConsoleStore import causing undefined variable errors 2. Replace non-existent .log() method with console.log() 3. Add #[serde(default)] to HikariConfig to handle missing fields gracefully The undefined variable was causing initialization to fail, which prevented the permission modal from displaying properly.
This commit is contained in:
@@ -28,6 +28,7 @@ pub struct ClaudeStartOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
#[serde(default)]
|
||||||
pub struct HikariConfig {
|
pub struct HikariConfig {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub model: Option<String>,
|
pub model: Option<String>,
|
||||||
|
|||||||
@@ -328,9 +328,15 @@ export async function initializeTauriListeners() {
|
|||||||
});
|
});
|
||||||
unlisteners.push(cwdUnlisten);
|
unlisteners.push(cwdUnlisten);
|
||||||
|
|
||||||
|
console.log("[Tauri Listener] Setting up claude:permission listener");
|
||||||
const permissionUnlisten = await listen<PermissionPromptEvent>("claude:permission", (event) => {
|
const permissionUnlisten = await listen<PermissionPromptEvent>("claude:permission", (event) => {
|
||||||
const { permissions, conversation_id } = event.payload;
|
const { permissions, conversation_id } = event.payload;
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
`[Permission] Event received: ${permissions.length} permission(s) for conversation ${conversation_id || "active"}`,
|
||||||
|
{ permissions, conversation_id }
|
||||||
|
);
|
||||||
|
|
||||||
// Store each permission request for the specific conversation
|
// Store each permission request for the specific conversation
|
||||||
for (const permission of permissions) {
|
for (const permission of permissions) {
|
||||||
const { id, tool_name, tool_input, description } = permission;
|
const { id, tool_name, tool_input, description } = permission;
|
||||||
|
|||||||
Reference in New Issue
Block a user