mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-07 04:42:10 +00:00
chore: Allow chat page to be scrollable, dont show waiting tasks in init sandbox (#283)
This commit is contained in:
parent
f9841ebdb2
commit
91d5b0b087
4 changed files with 6 additions and 7 deletions
|
|
@ -17,7 +17,7 @@ export default function ChatPage() {
|
||||||
const displayThreads: ThreadDisplayInfo[] = threads.map(threadToDisplayInfo);
|
const displayThreads: ThreadDisplayInfo[] = threads.map(threadToDisplayInfo);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-background h-screen overflow-y-hidden">
|
<div className="bg-background h-screen">
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<Toaster />
|
<Toaster />
|
||||||
<GitHubAppProvider>
|
<GitHubAppProvider>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Loader2,
|
Loader2,
|
||||||
CheckCircle,
|
CheckCircle,
|
||||||
XCircle,
|
XCircle,
|
||||||
GitBranch,
|
GitBranch,
|
||||||
MessageSquare,
|
|
||||||
FileText,
|
|
||||||
ChevronDown,
|
ChevronDown,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { useState, useEffect, useRef } from "react";
|
import { useState, useEffect, useRef } from "react";
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ export function DefaultView({ threads, threadsLoading }: DefaultViewProps) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Main Content */}
|
{/* Main Content */}
|
||||||
<div className="flex-1 overflow-auto">
|
<div className="flex-1 overflow-y-auto">
|
||||||
<div className="mx-auto max-w-4xl space-y-6 p-4">
|
<div className="mx-auto max-w-4xl space-y-6 p-4">
|
||||||
{/* Terminal Chat Input */}
|
{/* Terminal Chat Input */}
|
||||||
<Card
|
<Card
|
||||||
|
|
|
||||||
|
|
@ -48,14 +48,14 @@ export type Step = {
|
||||||
* Maps custom events to step objects for UI rendering. Skipped steps are filtered out.
|
* Maps custom events to step objects for UI rendering. Skipped steps are filtered out.
|
||||||
*/
|
*/
|
||||||
export function mapCustomEventsToSteps(events: CustomNodeEvent[]) {
|
export function mapCustomEventsToSteps(events: CustomNodeEvent[]) {
|
||||||
return INIT_STEPS.map((stepName) => {
|
return INIT_STEPS.flatMap((stepName) => {
|
||||||
const event = [...events]
|
const event = [...events]
|
||||||
.filter((e) => e.action === stepName)
|
.filter((e) => e.action === stepName)
|
||||||
.sort(
|
.sort(
|
||||||
(a, b) =>
|
(a, b) =>
|
||||||
new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
|
new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
|
||||||
)[0];
|
)[0];
|
||||||
if (!event) return { name: stepName, status: "waiting" as const };
|
if (!event) return [];
|
||||||
if (event.data.status === "skipped")
|
if (event.data.status === "skipped")
|
||||||
return { name: stepName, status: "skipped" as const };
|
return { name: stepName, status: "skipped" as const };
|
||||||
if (event.data.status === "pending")
|
if (event.data.status === "pending")
|
||||||
|
|
@ -69,6 +69,6 @@ export function mapCustomEventsToSteps(events: CustomNodeEvent[]) {
|
||||||
error:
|
error:
|
||||||
typeof event.data.error === "string" ? event.data.error : undefined,
|
typeof event.data.error === "string" ? event.data.error : undefined,
|
||||||
};
|
};
|
||||||
return { name: stepName, status: "waiting" as const };
|
return [];
|
||||||
}).filter((step) => step.status !== "skipped");
|
}).filter((step) => step.status !== "skipped");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue