mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-04 12:32:12 +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 { Card, CardContent } from "@/components/ui/card";
|
||||||
import { FilePlus2, Archive, Zap } from "lucide-react";
|
import { FilePlus2, Archive, Zap } from "lucide-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { ThreadMetadata } from "./types";
|
|
||||||
import { TerminalInput } from "./terminal-input";
|
import { TerminalInput } from "./terminal-input";
|
||||||
import { useFileUpload } from "@/hooks/useFileUpload";
|
import { useFileUpload } from "@/hooks/useFileUpload";
|
||||||
import { cn } from "@/lib/utils";
|
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 { ManagerGraphState } from "@open-swe/shared/open-swe/manager/types";
|
||||||
import { useState, useMemo } from "react";
|
import { useState, useMemo } from "react";
|
||||||
import { threadsToMetadata } from "@/lib/thread-utils";
|
import { threadsToMetadata } from "@/lib/thread-utils";
|
||||||
import { Settings } from "lucide-react";
|
import { Settings, BookOpen } from "lucide-react";
|
||||||
import NextLink from "next/link";
|
import NextLink from "next/link";
|
||||||
|
|
||||||
function OpenSettingsButton() {
|
function OpenSettingsButton() {
|
||||||
return (
|
return (
|
||||||
<TooltipProvider>
|
<TooltipProvider>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger
|
||||||
|
asChild
|
||||||
|
className="hover:bg-accent hover:text-accent-foreground size-6 rounded-md p-1 hover:cursor-pointer"
|
||||||
|
>
|
||||||
<NextLink href="/settings">
|
<NextLink href="/settings">
|
||||||
<Settings className="size-4" />
|
<Settings className="size-4" />
|
||||||
</NextLink>
|
</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 {
|
interface DefaultViewProps {
|
||||||
threads: Thread<ManagerGraphState>[];
|
threads: Thread<ManagerGraphState>[];
|
||||||
threadsLoading: boolean;
|
threadsLoading: boolean;
|
||||||
|
|
@ -106,6 +132,7 @@ export function DefaultView({ threads, threadsLoading }: DefaultViewProps) {
|
||||||
<span className="text-muted-foreground text-xs">ready</span>
|
<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 className="h-1 w-1 rounded-full bg-green-500 dark:bg-green-600"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<OpenDocumentationButton />
|
||||||
<OpenSettingsButton />
|
<OpenSettingsButton />
|
||||||
<ThemeToggle />
|
<ThemeToggle />
|
||||||
<GitHubLogoutButton />
|
<GitHubLogoutButton />
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue