feat(web): add agent management UI and improve launcher integration (#1358)

* Improve the web launcher and gateway integration across backend and frontend.

- add runtime model availability checks for local and OAuth-backed models
- support launcher-driven gateway host overrides and websocket URL resolution
- add gateway log clearing and keep incremental log sync consistent after resets
- migrate session history APIs to JSONL metadata-backed storage with legacy fallback
- expose session titles and improve chat history loading and error handling
- move shared backend runtime helpers into the web utils package
- avoid blocking web startup when automatic onboard initialization fails
- add backend tests covering gateway readiness, host resolution, models, logs, and sessions

* feat(agent): add skills and tools management APIs and UI

- add backend APIs to list, view, import, and delete skills
- add tool status and toggle endpoints with dependency-aware config updates
- add agent skills/tools pages, routes, sidebar entries, and i18n strings
- add backend tests for the new skills and tools flows

* chore(frontend): upgrade shadcn to 4.0.5 and refresh lockfile

* chore(web): keep backend dist placeholder tracked
This commit is contained in:
wenjie authored and GitHub committed 2026-03-11 18:37:00 +08:00
1 parent 8a398988d7
commit dea06c391c
45 files changed
+4259 -320

No files matched your search

+14 -5
View File
@@ -43,11 +43,18 @@ export function ChatPage() {
handleSetDefault,
} = useChatModels({ isConnected })
const { sessions, hasMore, observerRef, loadSessions, handleDeleteSession } =
useSessionHistory({
activeSessionId,
onDeletedActiveSession: newChat,
})
const {
sessions,
hasMore,
loadError,
loadErrorMessage,
observerRef,
loadSessions,
handleDeleteSession,
} = useSessionHistory({
activeSessionId,
onDeletedActiveSession: newChat,
})
const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {
const { scrollTop, scrollHeight, clientHeight } = e.currentTarget
@@ -96,6 +103,8 @@ export function ChatPage() {
sessions={sessions}
activeSessionId={activeSessionId}
hasMore={hasMore}
loadError={loadError}
loadErrorMessage={loadErrorMessage}
observerRef={observerRef}
onOpenChange={(open) => {
if (open) {
@@ -17,6 +17,8 @@ interface SessionHistoryMenuProps {
sessions: SessionSummary[]
activeSessionId: string
hasMore: boolean
loadError: boolean
loadErrorMessage: string
observerRef: RefObject<HTMLDivElement | null>
onOpenChange: (open: boolean) => void
onSwitchSession: (sessionId: string) => void
@@ -27,6 +29,8 @@ export function SessionHistoryMenu({
sessions,
activeSessionId,
hasMore,
loadError,
loadErrorMessage,
observerRef,
onOpenChange,
onSwitchSession,
@@ -44,7 +48,14 @@ export function SessionHistoryMenu({
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-72">
<ScrollArea className="max-h-[300px]">
{sessions.length === 0 ? (
{loadError && (
<DropdownMenuItem disabled>
<span className="text-destructive text-xs">
{loadErrorMessage}
</span>
</DropdownMenuItem>
)}
{sessions.length === 0 && !loadError ? (
<DropdownMenuItem disabled>
<span className="text-muted-foreground text-xs">
{t("chat.noHistory")}
@@ -60,7 +71,7 @@ export function SessionHistoryMenu({
onClick={() => onSwitchSession(session.id)}
>
<span className="line-clamp-1 text-sm font-medium">
{session.preview}
{session.title || session.preview}
</span>
<span className="text-muted-foreground text-xs">
{t("chat.messagesCount", {