mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-03 05:43:27 +00:00
fix: Dont wrap layout in Github app provide since not all require it (#549)
* fix: Dont wrap layout in Github app provide since not all require it * cr * cr
This commit is contained in:
parent
83771e3ff7
commit
c5aefa09f6
4 changed files with 15 additions and 12 deletions
|
|
@ -25,7 +25,6 @@ export default function ThreadPage({
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { thread_id } = use(params);
|
const { thread_id } = use(params);
|
||||||
const { currentInstallation } = useGitHubAppProvider();
|
|
||||||
const stream = useStream<ManagerGraphState>({
|
const stream = useStream<ManagerGraphState>({
|
||||||
apiUrl: process.env.NEXT_PUBLIC_API_URL ?? "",
|
apiUrl: process.env.NEXT_PUBLIC_API_URL ?? "",
|
||||||
assistantId: MANAGER_GRAPH_ID,
|
assistantId: MANAGER_GRAPH_ID,
|
||||||
|
|
@ -36,7 +35,6 @@ export default function ThreadPage({
|
||||||
|
|
||||||
const { threads, isLoading: threadsLoading } = useThreadsSWR({
|
const { threads, isLoading: threadsLoading } = useThreadsSWR({
|
||||||
assistantId: MANAGER_GRAPH_ID,
|
assistantId: MANAGER_GRAPH_ID,
|
||||||
currentInstallation,
|
|
||||||
disableOrgFiltering: true,
|
disableOrgFiltering: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import "../../globals.css";
|
import "../../globals.css";
|
||||||
import React, { Suspense } from "react";
|
import React, { Suspense } from "react";
|
||||||
import { GitHubAppProvider } from "@/providers/GitHubApp";
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Open SWE - Chat",
|
title: "Open SWE - Chat",
|
||||||
|
|
@ -18,9 +17,5 @@ export default function RootLayout({
|
||||||
}: Readonly<{
|
}: Readonly<{
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}>) {
|
}>) {
|
||||||
return (
|
return <Suspense fallback={<div>Loading...</div>}>{children}</Suspense>;
|
||||||
<Suspense fallback={<div>Loading...</div>}>
|
|
||||||
<GitHubAppProvider>{children}</GitHubAppProvider>
|
|
||||||
</Suspense>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
import { DefaultView } from "@/components/v2/default-view";
|
import { DefaultView } from "@/components/v2/default-view";
|
||||||
import { useThreadsSWR } from "@/hooks/useThreadsSWR";
|
import { useThreadsSWR } from "@/hooks/useThreadsSWR";
|
||||||
import { useGitHubAppProvider } from "@/providers/GitHubApp";
|
import { GitHubAppProvider, useGitHubAppProvider } from "@/providers/GitHubApp";
|
||||||
import { Toaster } from "@/components/ui/sonner";
|
import { Toaster } from "@/components/ui/sonner";
|
||||||
import { Suspense } from "react";
|
import { Suspense } from "react";
|
||||||
import { MANAGER_GRAPH_ID } from "@open-swe/shared/constants";
|
import { MANAGER_GRAPH_ID } from "@open-swe/shared/constants";
|
||||||
|
|
||||||
export default function ChatPage() {
|
function ChatPageComponent() {
|
||||||
const { currentInstallation } = useGitHubAppProvider();
|
const { currentInstallation } = useGitHubAppProvider();
|
||||||
const { threads, isLoading: threadsLoading } = useThreadsSWR({
|
const { threads, isLoading: threadsLoading } = useThreadsSWR({
|
||||||
assistantId: MANAGER_GRAPH_ID,
|
assistantId: MANAGER_GRAPH_ID,
|
||||||
|
|
@ -30,3 +30,11 @@ export default function ChatPage() {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default function ChatPage() {
|
||||||
|
return (
|
||||||
|
<GitHubAppProvider>
|
||||||
|
<ChatPageComponent />
|
||||||
|
</GitHubAppProvider>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import { useThreadsSWR } from "@/hooks/useThreadsSWR";
|
||||||
import { ThreadCard, ThreadCardLoading } from "@/components/v2/thread-card";
|
import { ThreadCard, ThreadCardLoading } from "@/components/v2/thread-card";
|
||||||
import { ThemeToggle } from "@/components/theme-toggle";
|
import { ThemeToggle } from "@/components/theme-toggle";
|
||||||
import { InstallationSelector } from "@/components/github/installation-selector";
|
import { InstallationSelector } from "@/components/github/installation-selector";
|
||||||
import { useGitHubAppProvider } from "@/providers/GitHubApp";
|
import { GitHubAppProvider, useGitHubAppProvider } from "@/providers/GitHubApp";
|
||||||
import { MANAGER_GRAPH_ID } from "@open-swe/shared/constants";
|
import { MANAGER_GRAPH_ID } from "@open-swe/shared/constants";
|
||||||
import { useThreadsStatus } from "@/hooks/useThreadsStatus";
|
import { useThreadsStatus } from "@/hooks/useThreadsStatus";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
@ -260,7 +260,9 @@ function AllThreadsPageContent() {
|
||||||
export default function AllThreadsPage() {
|
export default function AllThreadsPage() {
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={<div>Loading...</div>}>
|
<Suspense fallback={<div>Loading...</div>}>
|
||||||
<AllThreadsPageContent />
|
<GitHubAppProvider>
|
||||||
|
<AllThreadsPageContent />
|
||||||
|
</GitHubAppProvider>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue