-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
360b07f
commit 44709da
Showing
1 changed file
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ import { z } from 'zod'; | |
|
||
import logo from '../../../src-tauri/icons/[email protected]'; | ||
import { OllamaModels } from '../../components/shinkai-node-manager/ollama-models'; | ||
import { useRetrieveLogsQuery } from '../../lib/shinkai-logs/logs-client'; | ||
import { ALLOWED_OLLAMA_MODELS } from '../../lib/shinkai-node-manager/ollama-models'; | ||
import { | ||
shinkaiNodeQueryClient, | ||
|
@@ -84,6 +85,7 @@ const App = () => { | |
const setLogout = useAuth((auth) => auth.setLogout); | ||
const { setShinkaiNodeOptions } = useShinkaiNodeManager(); | ||
const logsScrollRef = useRef<HTMLDivElement | null>(null); | ||
const tauriLogsScrollRef = useRef<HTMLDivElement | null>(null); | ||
const [isConfirmResetDialogOpened, setIsConfirmResetDialogOpened] = | ||
useState<boolean>(false); | ||
const { data: shinkaiNodeIsRunning } = useShinkaiNodeIsRunningQuery({ | ||
|
@@ -94,10 +96,11 @@ const App = () => { | |
}); | ||
const { data: lastNLogs } = useShinkaiNodeGetLastNLogsQuery( | ||
{ length: 100 }, | ||
{ | ||
refetchInterval: 1000, | ||
}, | ||
{ refetchInterval: 1000 }, | ||
); | ||
|
||
const { data: tauriLogs } = useRetrieveLogsQuery(); | ||
|
||
const { | ||
isPending: shinkaiNodeSpawnIsPending, | ||
mutateAsync: shinkaiNodeSpawn, | ||
|
@@ -314,7 +317,19 @@ const App = () => { | |
> | ||
<TabsList className="w-full"> | ||
<TabsTrigger className="grow" value="logs"> | ||
Logs | ||
Shinkai Node Logs | ||
</TabsTrigger> | ||
<TabsTrigger | ||
className="grow" | ||
onClick={() => { | ||
tauriLogsScrollRef.current?.scrollIntoView({ | ||
behavior: 'smooth', | ||
block: 'end', | ||
}); | ||
}} | ||
value="tauri-logs" | ||
> | ||
Tauri Logs | ||
</TabsTrigger> | ||
<TabsTrigger className="grow" value="options"> | ||
Options | ||
|
@@ -342,6 +357,16 @@ const App = () => { | |
</div> | ||
</ScrollArea> | ||
</TabsContent> | ||
<TabsContent className="h-full overflow-hidden" value="tauri-logs"> | ||
<ScrollArea className="flex h-full flex-1 flex-col overflow-auto [&>div>div]:!block"> | ||
<div | ||
className="text-gray-80 whitespace-pre-wrap p-1 font-mono text-xs leading-relaxed" | ||
ref={tauriLogsScrollRef} | ||
> | ||
{tauriLogs} | ||
</div> | ||
</ScrollArea> | ||
</TabsContent> | ||
<TabsContent className="h-full overflow-hidden" value="options"> | ||
<ScrollArea className="flex h-full flex-1 flex-col overflow-auto [&>div>div]:!block"> | ||
<div className="flex flex-row justify-end pr-4"> | ||
|