Merge pull request #162 from NeuralNomadsAI/codenomad/pr-161

Add new session icon to sessions sidebar header
This commit is contained in:
Shantur Rathore
2026-02-12 16:53:35 +00:00
committed by GitHub
7 changed files with 28 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ import type { Session } from "../../../types/session"
import type { KeyboardShortcut } from "../../../lib/keyboard-registry"
import type { DrawerViewState } from "./types"
import { Search } from "lucide-solid"
import { PlusSquare, Search } from "lucide-solid"
import IconButton from "@suid/material/IconButton"
import MenuOpenIcon from "@suid/icons-material/MenuOpen"
import PushPinIcon from "@suid/icons-material/PushPin"
@@ -56,6 +56,20 @@ const SessionSidebar: Component<SessionSidebarProps> = (props) => (
{props.t("instanceShell.leftPanel.sessionsTitle")}
</span>
<div class="flex items-center gap-2 text-primary">
<IconButton
size="small"
color="inherit"
aria-label={props.t("sessionList.actions.newSession.ariaLabel")}
title={props.t("sessionList.actions.newSession.title")}
onClick={() => {
const result = props.onNewSession()
if (result instanceof Promise) {
void result.catch((error) => log.error("Failed to create session:", error))
}
}}
>
<PlusSquare class="w-5 h-5" />
</IconButton>
<IconButton
size="small"
color="inherit"
@@ -71,7 +85,7 @@ const SessionSidebar: Component<SessionSidebarProps> = (props) => (
},
}}
>
<Search class={props.showSearch() ? "w-4 h-4" : "w-4 h-4 opacity-70"} />
<Search class="w-5 h-5" />
</IconButton>
<IconButton
size="small"

View File

@@ -21,6 +21,8 @@ export const sessionMessages = {
"sessionList.expand.expandAriaLabel": "Expand session",
"sessionList.expand.collapseTitle": "Collapse",
"sessionList.expand.expandTitle": "Expand",
"sessionList.actions.newSession.ariaLabel": "New session",
"sessionList.actions.newSession.title": "New session",
"sessionList.actions.copyId.ariaLabel": "Copy session ID",
"sessionList.actions.copyId.title": "Copy session ID",
"sessionList.actions.rename.ariaLabel": "Rename session",

View File

@@ -21,6 +21,8 @@ export const sessionMessages = {
"sessionList.expand.expandAriaLabel": "Expandir sesión",
"sessionList.expand.collapseTitle": "Colapsar",
"sessionList.expand.expandTitle": "Expandir",
"sessionList.actions.newSession.ariaLabel": "Nueva sesión",
"sessionList.actions.newSession.title": "Nueva sesión",
"sessionList.actions.copyId.ariaLabel": "Copiar ID de sesión",
"sessionList.actions.copyId.title": "Copiar ID de sesión",
"sessionList.actions.rename.ariaLabel": "Renombrar sesión",

View File

@@ -21,6 +21,8 @@ export const sessionMessages = {
"sessionList.expand.expandAriaLabel": "Développer la session",
"sessionList.expand.collapseTitle": "Réduire",
"sessionList.expand.expandTitle": "Développer",
"sessionList.actions.newSession.ariaLabel": "Nouvelle session",
"sessionList.actions.newSession.title": "Nouvelle session",
"sessionList.actions.copyId.ariaLabel": "Copier l'ID de session",
"sessionList.actions.copyId.title": "Copier l'ID de session",
"sessionList.actions.rename.ariaLabel": "Renommer la session",

View File

@@ -21,6 +21,8 @@ export const sessionMessages = {
"sessionList.expand.expandAriaLabel": "セッションを展開",
"sessionList.expand.collapseTitle": "折りたたむ",
"sessionList.expand.expandTitle": "展開",
"sessionList.actions.newSession.ariaLabel": "新しいセッション",
"sessionList.actions.newSession.title": "新しいセッション",
"sessionList.actions.copyId.ariaLabel": "セッション ID をコピー",
"sessionList.actions.copyId.title": "セッション ID をコピー",
"sessionList.actions.rename.ariaLabel": "セッション名を変更",

View File

@@ -21,6 +21,8 @@ export const sessionMessages = {
"sessionList.expand.expandAriaLabel": "Развернуть сессию",
"sessionList.expand.collapseTitle": "Свернуть",
"sessionList.expand.expandTitle": "Развернуть",
"sessionList.actions.newSession.ariaLabel": "Новая сессия",
"sessionList.actions.newSession.title": "Новая сессия",
"sessionList.actions.copyId.ariaLabel": "Скопировать ID сессии",
"sessionList.actions.copyId.title": "Скопировать ID сессии",
"sessionList.actions.rename.ariaLabel": "Переименовать сессию",

View File

@@ -21,6 +21,8 @@ export const sessionMessages = {
"sessionList.expand.expandAriaLabel": "展开会话",
"sessionList.expand.collapseTitle": "折叠",
"sessionList.expand.expandTitle": "展开",
"sessionList.actions.newSession.ariaLabel": "新建会话",
"sessionList.actions.newSession.title": "新建会话",
"sessionList.actions.copyId.ariaLabel": "复制会话 ID",
"sessionList.actions.copyId.title": "复制会话 ID",
"sessionList.actions.rename.ariaLabel": "重命名会话",