feat(ui): add back button to session view and auto-clear active session on instance stop
This commit is contained in:
@@ -217,6 +217,7 @@ const App: Component = () => {
|
|||||||
|
|
||||||
if (!confirmed) return
|
if (!confirmed) return
|
||||||
|
|
||||||
|
clearActiveParentSession(instanceId)
|
||||||
await stopInstance(instanceId)
|
await stopInstance(instanceId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ import SessionView from "../session/session-view"
|
|||||||
import { Sidebar, type FileNode } from "./sidebar"
|
import { Sidebar, type FileNode } from "./sidebar"
|
||||||
import { Editor } from "./editor"
|
import { Editor } from "./editor"
|
||||||
import { serverApi } from "../../lib/api-client"
|
import { serverApi } from "../../lib/api-client"
|
||||||
import { Sparkles, Layout as LayoutIcon, Terminal as TerminalIcon, Search, Loader2, Zap, Shield, Settings, FileArchive } from "lucide-solid"
|
import { Sparkles, Layout as LayoutIcon, Terminal as TerminalIcon, Search, Loader2, Zap, Shield, Settings, FileArchive, ArrowLeft } from "lucide-solid"
|
||||||
import { formatTokenTotal } from "../../lib/formatters"
|
import { formatTokenTotal } from "../../lib/formatters"
|
||||||
import { sseManager } from "../../lib/sse-manager"
|
import { sseManager } from "../../lib/sse-manager"
|
||||||
import { getLogger } from "../../lib/logger"
|
import { getLogger } from "../../lib/logger"
|
||||||
@@ -1342,6 +1342,14 @@ Now analyze the project and report your findings.`
|
|||||||
<div class="flex items-center space-x-4">
|
<div class="flex items-center space-x-4">
|
||||||
<Show when={activeSessionIdForInstance() && activeSessionIdForInstance() !== "info"}>
|
<Show when={activeSessionIdForInstance() && activeSessionIdForInstance() !== "info"}>
|
||||||
<div class="flex items-center space-x-2">
|
<div class="flex items-center space-x-2">
|
||||||
|
<button
|
||||||
|
onClick={() => props.onCloseSession(activeSessionIdForInstance()!)}
|
||||||
|
class="flex items-center gap-1.5 px-2.5 py-1 text-[11px] font-semibold text-zinc-400 hover:text-white hover:bg-white/10 border border-transparent hover:border-white/10 transition-all rounded-full"
|
||||||
|
title="Back to Sessions"
|
||||||
|
>
|
||||||
|
<ArrowLeft size={14} strokeWidth={2} />
|
||||||
|
<span>Back</span>
|
||||||
|
</button>
|
||||||
{/* Compact Button */}
|
{/* Compact Button */}
|
||||||
<button
|
<button
|
||||||
onClick={handleCompact}
|
onClick={handleCompact}
|
||||||
|
|||||||
Reference in New Issue
Block a user