feat(v2): add permission mode passthrough and fix agent stop-on-close
- Add permission_mode field to AgentQueryOptions (Rust, sidecar, bridge) flowing from controller through sidecar to SDK; defaults to bypassPermissions, supports default mode - Fix AgentPane onDestroy bug: remove stopAgent() from onDestroy (fires on layout remounts), move stop-on-close to TilingGrid onClose handler - Bundle SDK into sidecar via esbuild (remove --external flag)
This commit is contained in:
parent
af0eb362e6
commit
d5eb08ed42
7 changed files with 26 additions and 14 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import { marked, Renderer } from 'marked';
|
||||
import { queryAgent, stopAgent, isAgentReady, restartAgent } from '../../adapters/agent-bridge';
|
||||
import {
|
||||
|
|
@ -68,11 +68,8 @@
|
|||
}
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
if (session?.status === 'running' || session?.status === 'starting') {
|
||||
stopAgent(sessionId).catch(() => {});
|
||||
}
|
||||
});
|
||||
// NOTE: Do NOT stop agents in onDestroy — it fires on layout changes/remounts,
|
||||
// not just explicit close. Stop-on-close is handled by TilingGrid.
|
||||
|
||||
let followUpPrompt = $state('');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue