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 @@ -67,6 +67,7 @@ export function getLayoutConfig() {
getWebUIConfig().layout || {
defaultLayout: 'default',
enableLayoutSwitchButton: false,
enableSidebar: true,
}
);
}
Expand All @@ -84,3 +85,10 @@ export function isLayoutSwitchButtonEnabled(): boolean {
export function getDefaultLayoutMode() {
return getLayoutConfig().defaultLayout || 'default';
}

/**
* Check if sidebar is enabled
*/
export function isSidebarEnabled(): boolean {
return getLayoutConfig().enableSidebar ?? true;
}
8 changes: 5 additions & 3 deletions multimodal/tarko/agent-ui/src/standalone/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ 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';

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

useEffect(() => {
if (isReplayMode) {
Expand Down Expand Up @@ -44,7 +46,7 @@ export const App: React.FC = () => {
console.log('[ReplayMode] Rendering replay layout directly');
return (
<div className="flex h-screen bg-[#F2F3F5] dark:bg-gray-900 text-gray-900 dark:text-gray-100 overflow-hidden">
<Sidebar />
{sidebarEnabled && <Sidebar />}
<div className="flex-1 flex flex-col overflow-hidden">
<Navbar />
<Layout isReplayMode={true} />
Expand All @@ -59,7 +61,7 @@ export const App: React.FC = () => {
path="/"
element={
<div className="flex h-screen bg-[#F2F3F5] dark:bg-gray-900 text-gray-900 dark:text-gray-100 overflow-hidden">
<Sidebar />
{sidebarEnabled && <Sidebar />}
<div className="flex-1 flex flex-col overflow-hidden">
<HomePage />
</div>
Expand All @@ -70,7 +72,7 @@ export const App: React.FC = () => {
path="/:sessionId"
element={
<div className="flex h-screen bg-[#F2F3F5] dark:bg-gray-900 text-gray-900 dark:text-gray-100 overflow-hidden">
<Sidebar />
{sidebarEnabled && <Sidebar />}
<div className="flex-1 flex flex-col overflow-hidden">
<Navbar />
<SessionRouter>
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 @@ -61,6 +61,11 @@ export interface LayoutConfig {
* @defaultValue false
*/
enableLayoutSwitchButton?: boolean;
/**
* Enable sidebar display
* @defaultValue true
*/
enableSidebar?: boolean;
}

/**
Expand Down