@@ -23,7 +23,6 @@ import { useSync } from "@/context/sync"
2323import { useTerminal , type LocalPTY } from "@/context/terminal"
2424import { useLayout } from "@/context/layout"
2525import { checksum , base64Encode } from "@opencode-ai/util/encode"
26- import { findLast } from "@opencode-ai/util/array"
2726import { useDialog } from "@opencode-ai/ui/context/dialog"
2827import { DialogSelectFile } from "@/components/dialog-select-file"
2928import FileTree from "@/components/file-tree"
@@ -35,7 +34,6 @@ import { useSDK } from "@/context/sdk"
3534import { usePrompt } from "@/context/prompt"
3635import { useComments } from "@/context/comments"
3736import { ConstrainDragYAxis , getDraggableId } from "@/utils/solid-dnd"
38- import { usePermission } from "@/context/permission"
3937import { showToast } from "@opencode-ai/ui/toast"
4038import { SessionHeader , SessionContextTab , SortableTab , FileVisual , NewSessionView } from "@/components/session"
4139import { navMark , navParams } from "@/utils/perf"
@@ -101,7 +99,6 @@ export default function Page() {
10199 const sdk = useSDK ( )
102100 const prompt = usePrompt ( )
103101 const comments = useComments ( )
104- const permission = usePermission ( )
105102
106103 const permRequest = createMemo ( ( ) => {
107104 const sessionID = params . id
@@ -272,6 +269,7 @@ export default function Page() {
272269 if ( ! path ) return
273270 file . load ( path )
274271 openReviewPanel ( )
272+ tabs ( ) . setActive ( next )
275273 }
276274
277275 createEffect ( ( ) => {
@@ -769,11 +767,6 @@ export default function Page() {
769767 return lines . slice ( 0 , 2 ) . join ( "\n" )
770768 }
771769
772- const addSelectionToContext = ( path : string , selection : FileSelection ) => {
773- const preview = selectionPreview ( path , selection )
774- prompt . context . add ( { type : "file" , path, selection, preview } )
775- }
776-
777770 const addCommentToContext = ( input : {
778771 file : string
779772 selection : SelectedLineRange
@@ -912,31 +905,11 @@ export default function Page() {
912905 const focusInput = ( ) => inputRef ?. focus ( )
913906
914907 useSessionCommands ( {
915- command,
916- dialog,
917- file,
918- language,
919- local,
920- permission,
921- prompt,
922- sdk,
923- sync,
924- terminal,
925- layout,
926- params,
927- navigate,
928- tabs,
929- view,
930- info,
931- status,
932- userMessages,
933- visibleUserMessages,
934908 activeMessage,
935909 showAllFiles,
936910 navigateMessageByOffset,
937911 setExpanded : ( id , fn ) => setStore ( "expanded" , id , fn ) ,
938912 setActiveMessage,
939- addSelectionToContext,
940913 focusInput,
941914 } )
942915
0 commit comments