mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 10:23:14 +00:00
feat: Add docs link (#545)
This commit is contained in:
parent
c5aefa09f6
commit
15a4d77591
1 changed files with 30 additions and 3 deletions
|
|
@ -3,7 +3,6 @@ import { Button } from "@/components/ui/button";
|
|||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { FilePlus2, Archive, Zap } from "lucide-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { ThreadMetadata } from "./types";
|
||||
import { TerminalInput } from "./terminal-input";
|
||||
import { useFileUpload } from "@/hooks/useFileUpload";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
|
@ -31,14 +30,17 @@ import { Thread } from "@langchain/langgraph-sdk";
|
|||
import { ManagerGraphState } from "@open-swe/shared/open-swe/manager/types";
|
||||
import { useState, useMemo } from "react";
|
||||
import { threadsToMetadata } from "@/lib/thread-utils";
|
||||
import { Settings } from "lucide-react";
|
||||
import { Settings, BookOpen } from "lucide-react";
|
||||
import NextLink from "next/link";
|
||||
|
||||
function OpenSettingsButton() {
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger>
|
||||
<TooltipTrigger
|
||||
asChild
|
||||
className="hover:bg-accent hover:text-accent-foreground size-6 rounded-md p-1 hover:cursor-pointer"
|
||||
>
|
||||
<NextLink href="/settings">
|
||||
<Settings className="size-4" />
|
||||
</NextLink>
|
||||
|
|
@ -49,6 +51,30 @@ function OpenSettingsButton() {
|
|||
);
|
||||
}
|
||||
|
||||
const DOCUMENTATION_URL = "https://docs.langchain.com/labs/swe";
|
||||
|
||||
function OpenDocumentationButton() {
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger
|
||||
asChild
|
||||
className="hover:bg-accent hover:text-accent-foreground size-6 rounded-md p-1 hover:cursor-pointer"
|
||||
>
|
||||
<a
|
||||
href={DOCUMENTATION_URL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<BookOpen className="size-4" />
|
||||
</a>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="bottom">Open Documentation</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
);
|
||||
}
|
||||
|
||||
interface DefaultViewProps {
|
||||
threads: Thread<ManagerGraphState>[];
|
||||
threadsLoading: boolean;
|
||||
|
|
@ -106,6 +132,7 @@ export function DefaultView({ threads, threadsLoading }: DefaultViewProps) {
|
|||
<span className="text-muted-foreground text-xs">ready</span>
|
||||
<div className="h-1 w-1 rounded-full bg-green-500 dark:bg-green-600"></div>
|
||||
</div>
|
||||
<OpenDocumentationButton />
|
||||
<OpenSettingsButton />
|
||||
<ThemeToggle />
|
||||
<GitHubLogoutButton />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue