mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 09:13:14 +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);
|
||||
|
||||
return (
|
||||
<div className="bg-background h-screen overflow-y-hidden">
|
||||
<div className="bg-background h-screen">
|
||||
<Suspense>
|
||||
<Toaster />
|
||||
<GitHubAppProvider>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
"use client";
|
||||
|
||||
import {
|
||||
Loader2,
|
||||
CheckCircle,
|
||||
XCircle,
|
||||
GitBranch,
|
||||
MessageSquare,
|
||||
FileText,
|
||||
ChevronDown,
|
||||
} from "lucide-react";
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ export function DefaultView({ threads, threadsLoading }: DefaultViewProps) {
|
|||
</div>
|
||||
|
||||
{/* 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">
|
||||
{/* Terminal Chat Input */}
|
||||
<Card
|
||||
|
|
|
|||
|
|
@ -48,14 +48,14 @@ export type Step = {
|
|||
* Maps custom events to step objects for UI rendering. Skipped steps are filtered out.
|
||||
*/
|
||||
export function mapCustomEventsToSteps(events: CustomNodeEvent[]) {
|
||||
return INIT_STEPS.map((stepName) => {
|
||||
return INIT_STEPS.flatMap((stepName) => {
|
||||
const event = [...events]
|
||||
.filter((e) => e.action === stepName)
|
||||
.sort(
|
||||
(a, b) =>
|
||||
new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
|
||||
)[0];
|
||||
if (!event) return { name: stepName, status: "waiting" as const };
|
||||
if (!event) return [];
|
||||
if (event.data.status === "skipped")
|
||||
return { name: stepName, status: "skipped" as const };
|
||||
if (event.data.status === "pending")
|
||||
|
|
@ -69,6 +69,6 @@ export function mapCustomEventsToSteps(events: CustomNodeEvent[]) {
|
|||
error:
|
||||
typeof event.data.error === "string" ? event.data.error : undefined,
|
||||
};
|
||||
return { name: stepName, status: "waiting" as const };
|
||||
return [];
|
||||
}).filter((step) => step.status !== "skipped");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue