Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions multimodal/tarko/agent-ui/src/config/web-ui-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export function getLayoutConfig() {
defaultLayout: 'default',
enableLayoutSwitchButton: false,
enableSidebar: true,
enableHome: true,
}
);
}
Expand All @@ -92,3 +93,10 @@ export function getDefaultLayoutMode() {
export function isSidebarEnabled(): boolean {
return getLayoutConfig().enableSidebar ?? true;
}

/**
* Check if home route is enabled
*/
export function isHomeEnabled(): boolean {
return getLayoutConfig().enableHome ?? true;
}
25 changes: 14 additions & 11 deletions multimodal/tarko/agent-ui/src/standalone/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import { useReplayMode } from '@/common/hooks/useReplayMode';
import { SessionRouter } from './Router/SessionRouter';
import { Sidebar } from '@/standalone/sidebar';
import { Navbar } from '@/standalone/navbar';
import { isSidebarEnabled } from '@/config/web-ui-config';
import { isSidebarEnabled, isHomeEnabled } from '@/config/web-ui-config';

export const App: React.FC = () => {
const { initConnectionMonitoring, loadSessions, connectionStatus, activeSessionId } =
useSession();
const { isReplayMode } = useReplayMode();
const sidebarEnabled = isSidebarEnabled();
const homeEnabled = isHomeEnabled();

useEffect(() => {
if (isReplayMode) {
Expand Down Expand Up @@ -57,17 +58,19 @@ export const App: React.FC = () => {

return (
<Routes>
<Route
path="/"
element={
<div className="flex h-screen bg-[#F2F3F5] dark:bg-gray-900 text-gray-900 dark:text-gray-100 overflow-hidden">
{sidebarEnabled && <Sidebar />}
<div className="flex-1 flex flex-col overflow-hidden">
<HomePage />
{homeEnabled && (
<Route
path="/"
element={
<div className="flex h-screen bg-[#F2F3F5] dark:bg-gray-900 text-gray-900 dark:text-gray-100 overflow-hidden">
{sidebarEnabled && <Sidebar />}
<div className="flex-1 flex flex-col overflow-hidden">
<HomePage />
</div>
</div>
</div>
}
/>
}
/>
)}
<Route
path="/:sessionId"
element={
Expand Down
5 changes: 5 additions & 0 deletions multimodal/tarko/interface/src/web-ui-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export interface LayoutConfig {
* @defaultValue true
*/
enableSidebar?: boolean;
/**
* Enable home route registration
* @defaultValue true
*/
enableHome?: boolean;
}

/**
Expand Down
Loading