2025-06-13 17:08:26 -07:00
|
|
|
import { Check, Clock, Pencil, Play, Trash } from "lucide-react";
|
feat: Update chat UI to be Open SWE specific (#76) (#91)
* init repo-selector
* add branch selector UI, extend GH hook w branch info
* add reconnectOnMount: true resumeStream, remove repo description from selector, fix styling
* styling repo + branch
* udpate getBranch calls to include targetRepo arg
* format
* add search to repo + branch selectors
* add settings icon link to /github for dev convenience
* add default branch selection
* format
* minor cleanup
* init task list UI demo
* individual task component
* tasks real data
* task visual improvement
* persisting tasks, navigate to thread onClick
* task UI
* TaskSidebar, Navigate to tasks
* org tasks by thread
* group by thread
* improve sidebar, task-list, rm github modal on refresh
* collapse sidebar works when viewing a thread
* remove micro-tasks expansion from threads component, change taskId to taskIndex for persistence + simplicity
* init config sidebar ui
* open and close config sidebar
* add ref for getAllTasks + add graph_id metadata
* format
* create threadItem component
* format
* add threadUtils
* centralize + refactor types
* format
* improve thread status, realtime updates
* fix scroll issue
* remove temperature from config-sidebar
* Change model via sidebar
* fix flashing on updates
* init plan UI
* centralize types
* self CR: refactoring, cleanup, remove comments, add todos
* CR: clean comments + logs, fix repo selector bug
* fix: Update example env file in web (#77)
* disable auto scroll on pageload
* reposelector: use default branch not main master
* remove archived tab temp, default branch listed first in branchSelector dropdown
* auto select first repo
* improve status indicator
* refactor status indicator
* simplify status implementation to use Langgraph
* util moved from provider to thread-utils
* linting, improve task completion logic
* feat: Support followup requests (#60)
* feat: Support followup requests
* cr
* cr
* fix
* account for pr already exists
* remove task provider
* fix: Better prompting and context provided for codebase structure awareness (#85)
* fix: Better prompting and context provided for codebase structure awareness
* cr
* linting + skeleton loader
* fix: branch selector, add github api pagination
* small branch update
* update task completion status realtime
* threadItem stream remove flashing/polling
* feat: Create a shared package (#89)
* feat: Create a shared package
* formatting
* fix: drop passing target repo to getBranchName
* drop docs
* use shared package for config fields in config sidebar
* fix: styling and structure for repo/branch selectors
* fix: use shared types/objects for config fields
* default key for configs
* fix: improved styling for threads
* fix renering num tasks
* disable repo branch selector when chat started
* cr
* cr
* bump deps
* fix: rendering plan in interrupt
* cr
* cr
---------
Co-authored-by: Dylan Boudro <121908331+starmorph@users.noreply.github.com>
2025-06-08 17:29:40 -07:00
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
import { PlanItem } from "@open-swe/shared/open-swe/types";
|
2025-06-13 17:08:26 -07:00
|
|
|
import { TooltipIconButton } from "../ui/tooltip-icon-button";
|
|
|
|
|
import { Dispatch, SetStateAction, useState } from "react";
|
|
|
|
|
import { Textarea } from "../ui/textarea";
|
|
|
|
|
import { Button } from "../ui/button";
|
feat: Update chat UI to be Open SWE specific (#76) (#91)
* init repo-selector
* add branch selector UI, extend GH hook w branch info
* add reconnectOnMount: true resumeStream, remove repo description from selector, fix styling
* styling repo + branch
* udpate getBranch calls to include targetRepo arg
* format
* add search to repo + branch selectors
* add settings icon link to /github for dev convenience
* add default branch selection
* format
* minor cleanup
* init task list UI demo
* individual task component
* tasks real data
* task visual improvement
* persisting tasks, navigate to thread onClick
* task UI
* TaskSidebar, Navigate to tasks
* org tasks by thread
* group by thread
* improve sidebar, task-list, rm github modal on refresh
* collapse sidebar works when viewing a thread
* remove micro-tasks expansion from threads component, change taskId to taskIndex for persistence + simplicity
* init config sidebar ui
* open and close config sidebar
* add ref for getAllTasks + add graph_id metadata
* format
* create threadItem component
* format
* add threadUtils
* centralize + refactor types
* format
* improve thread status, realtime updates
* fix scroll issue
* remove temperature from config-sidebar
* Change model via sidebar
* fix flashing on updates
* init plan UI
* centralize types
* self CR: refactoring, cleanup, remove comments, add todos
* CR: clean comments + logs, fix repo selector bug
* fix: Update example env file in web (#77)
* disable auto scroll on pageload
* reposelector: use default branch not main master
* remove archived tab temp, default branch listed first in branchSelector dropdown
* auto select first repo
* improve status indicator
* refactor status indicator
* simplify status implementation to use Langgraph
* util moved from provider to thread-utils
* linting, improve task completion logic
* feat: Support followup requests (#60)
* feat: Support followup requests
* cr
* cr
* fix
* account for pr already exists
* remove task provider
* fix: Better prompting and context provided for codebase structure awareness (#85)
* fix: Better prompting and context provided for codebase structure awareness
* cr
* linting + skeleton loader
* fix: branch selector, add github api pagination
* small branch update
* update task completion status realtime
* threadItem stream remove flashing/polling
* feat: Create a shared package (#89)
* feat: Create a shared package
* formatting
* fix: drop passing target repo to getBranchName
* drop docs
* use shared package for config fields in config sidebar
* fix: styling and structure for repo/branch selectors
* fix: use shared types/objects for config fields
* default key for configs
* fix: improved styling for threads
* fix renering num tasks
* disable repo branch selector when chat started
* cr
* cr
* bump deps
* fix: rendering plan in interrupt
* cr
* cr
---------
Co-authored-by: Dylan Boudro <121908331+starmorph@users.noreply.github.com>
2025-06-08 17:29:40 -07:00
|
|
|
|
|
|
|
|
interface PlanViewerProps {
|
|
|
|
|
planItems: PlanItem[];
|
|
|
|
|
className?: string;
|
|
|
|
|
isProposedPlan?: boolean;
|
2025-06-13 17:08:26 -07:00
|
|
|
setPlanItems?: Dispatch<SetStateAction<PlanItem[]>>;
|
feat: Update chat UI to be Open SWE specific (#76) (#91)
* init repo-selector
* add branch selector UI, extend GH hook w branch info
* add reconnectOnMount: true resumeStream, remove repo description from selector, fix styling
* styling repo + branch
* udpate getBranch calls to include targetRepo arg
* format
* add search to repo + branch selectors
* add settings icon link to /github for dev convenience
* add default branch selection
* format
* minor cleanup
* init task list UI demo
* individual task component
* tasks real data
* task visual improvement
* persisting tasks, navigate to thread onClick
* task UI
* TaskSidebar, Navigate to tasks
* org tasks by thread
* group by thread
* improve sidebar, task-list, rm github modal on refresh
* collapse sidebar works when viewing a thread
* remove micro-tasks expansion from threads component, change taskId to taskIndex for persistence + simplicity
* init config sidebar ui
* open and close config sidebar
* add ref for getAllTasks + add graph_id metadata
* format
* create threadItem component
* format
* add threadUtils
* centralize + refactor types
* format
* improve thread status, realtime updates
* fix scroll issue
* remove temperature from config-sidebar
* Change model via sidebar
* fix flashing on updates
* init plan UI
* centralize types
* self CR: refactoring, cleanup, remove comments, add todos
* CR: clean comments + logs, fix repo selector bug
* fix: Update example env file in web (#77)
* disable auto scroll on pageload
* reposelector: use default branch not main master
* remove archived tab temp, default branch listed first in branchSelector dropdown
* auto select first repo
* improve status indicator
* refactor status indicator
* simplify status implementation to use Langgraph
* util moved from provider to thread-utils
* linting, improve task completion logic
* feat: Support followup requests (#60)
* feat: Support followup requests
* cr
* cr
* fix
* account for pr already exists
* remove task provider
* fix: Better prompting and context provided for codebase structure awareness (#85)
* fix: Better prompting and context provided for codebase structure awareness
* cr
* linting + skeleton loader
* fix: branch selector, add github api pagination
* small branch update
* update task completion status realtime
* threadItem stream remove flashing/polling
* feat: Create a shared package (#89)
* feat: Create a shared package
* formatting
* fix: drop passing target repo to getBranchName
* drop docs
* use shared package for config fields in config sidebar
* fix: styling and structure for repo/branch selectors
* fix: use shared types/objects for config fields
* default key for configs
* fix: improved styling for threads
* fix renering num tasks
* disable repo branch selector when chat started
* cr
* cr
* bump deps
* fix: rendering plan in interrupt
* cr
* cr
---------
Co-authored-by: Dylan Boudro <121908331+starmorph@users.noreply.github.com>
2025-06-08 17:29:40 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function PlanViewer({
|
|
|
|
|
planItems,
|
|
|
|
|
className,
|
|
|
|
|
isProposedPlan,
|
2025-06-13 17:08:26 -07:00
|
|
|
setPlanItems,
|
feat: Update chat UI to be Open SWE specific (#76) (#91)
* init repo-selector
* add branch selector UI, extend GH hook w branch info
* add reconnectOnMount: true resumeStream, remove repo description from selector, fix styling
* styling repo + branch
* udpate getBranch calls to include targetRepo arg
* format
* add search to repo + branch selectors
* add settings icon link to /github for dev convenience
* add default branch selection
* format
* minor cleanup
* init task list UI demo
* individual task component
* tasks real data
* task visual improvement
* persisting tasks, navigate to thread onClick
* task UI
* TaskSidebar, Navigate to tasks
* org tasks by thread
* group by thread
* improve sidebar, task-list, rm github modal on refresh
* collapse sidebar works when viewing a thread
* remove micro-tasks expansion from threads component, change taskId to taskIndex for persistence + simplicity
* init config sidebar ui
* open and close config sidebar
* add ref for getAllTasks + add graph_id metadata
* format
* create threadItem component
* format
* add threadUtils
* centralize + refactor types
* format
* improve thread status, realtime updates
* fix scroll issue
* remove temperature from config-sidebar
* Change model via sidebar
* fix flashing on updates
* init plan UI
* centralize types
* self CR: refactoring, cleanup, remove comments, add todos
* CR: clean comments + logs, fix repo selector bug
* fix: Update example env file in web (#77)
* disable auto scroll on pageload
* reposelector: use default branch not main master
* remove archived tab temp, default branch listed first in branchSelector dropdown
* auto select first repo
* improve status indicator
* refactor status indicator
* simplify status implementation to use Langgraph
* util moved from provider to thread-utils
* linting, improve task completion logic
* feat: Support followup requests (#60)
* feat: Support followup requests
* cr
* cr
* fix
* account for pr already exists
* remove task provider
* fix: Better prompting and context provided for codebase structure awareness (#85)
* fix: Better prompting and context provided for codebase structure awareness
* cr
* linting + skeleton loader
* fix: branch selector, add github api pagination
* small branch update
* update task completion status realtime
* threadItem stream remove flashing/polling
* feat: Create a shared package (#89)
* feat: Create a shared package
* formatting
* fix: drop passing target repo to getBranchName
* drop docs
* use shared package for config fields in config sidebar
* fix: styling and structure for repo/branch selectors
* fix: use shared types/objects for config fields
* default key for configs
* fix: improved styling for threads
* fix renering num tasks
* disable repo branch selector when chat started
* cr
* cr
* bump deps
* fix: rendering plan in interrupt
* cr
* cr
---------
Co-authored-by: Dylan Boudro <121908331+starmorph@users.noreply.github.com>
2025-06-08 17:29:40 -07:00
|
|
|
}: PlanViewerProps) {
|
2025-06-13 17:08:26 -07:00
|
|
|
const [isEditing, setIsEditing] = useState<Record<number, boolean>>({});
|
|
|
|
|
const [newPlanItem, setNewPlanItem] = useState("");
|
feat: Update chat UI to be Open SWE specific (#76) (#91)
* init repo-selector
* add branch selector UI, extend GH hook w branch info
* add reconnectOnMount: true resumeStream, remove repo description from selector, fix styling
* styling repo + branch
* udpate getBranch calls to include targetRepo arg
* format
* add search to repo + branch selectors
* add settings icon link to /github for dev convenience
* add default branch selection
* format
* minor cleanup
* init task list UI demo
* individual task component
* tasks real data
* task visual improvement
* persisting tasks, navigate to thread onClick
* task UI
* TaskSidebar, Navigate to tasks
* org tasks by thread
* group by thread
* improve sidebar, task-list, rm github modal on refresh
* collapse sidebar works when viewing a thread
* remove micro-tasks expansion from threads component, change taskId to taskIndex for persistence + simplicity
* init config sidebar ui
* open and close config sidebar
* add ref for getAllTasks + add graph_id metadata
* format
* create threadItem component
* format
* add threadUtils
* centralize + refactor types
* format
* improve thread status, realtime updates
* fix scroll issue
* remove temperature from config-sidebar
* Change model via sidebar
* fix flashing on updates
* init plan UI
* centralize types
* self CR: refactoring, cleanup, remove comments, add todos
* CR: clean comments + logs, fix repo selector bug
* fix: Update example env file in web (#77)
* disable auto scroll on pageload
* reposelector: use default branch not main master
* remove archived tab temp, default branch listed first in branchSelector dropdown
* auto select first repo
* improve status indicator
* refactor status indicator
* simplify status implementation to use Langgraph
* util moved from provider to thread-utils
* linting, improve task completion logic
* feat: Support followup requests (#60)
* feat: Support followup requests
* cr
* cr
* fix
* account for pr already exists
* remove task provider
* fix: Better prompting and context provided for codebase structure awareness (#85)
* fix: Better prompting and context provided for codebase structure awareness
* cr
* linting + skeleton loader
* fix: branch selector, add github api pagination
* small branch update
* update task completion status realtime
* threadItem stream remove flashing/polling
* feat: Create a shared package (#89)
* feat: Create a shared package
* formatting
* fix: drop passing target repo to getBranchName
* drop docs
* use shared package for config fields in config sidebar
* fix: styling and structure for repo/branch selectors
* fix: use shared types/objects for config fields
* default key for configs
* fix: improved styling for threads
* fix renering num tasks
* disable repo branch selector when chat started
* cr
* cr
* bump deps
* fix: rendering plan in interrupt
* cr
* cr
---------
Co-authored-by: Dylan Boudro <121908331+starmorph@users.noreply.github.com>
2025-06-08 17:29:40 -07:00
|
|
|
const currentTaskIndex = planItems
|
|
|
|
|
.filter((item) => !item.completed)
|
|
|
|
|
.reduce(
|
|
|
|
|
(minIndex, item) => (item.index < minIndex ? item.index : minIndex),
|
|
|
|
|
Infinity,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const getTaskStatus = (item: PlanItem) => {
|
|
|
|
|
if (isProposedPlan) return "proposed";
|
|
|
|
|
if (item.completed) return "completed";
|
|
|
|
|
if (item.index === currentTaskIndex) return "current";
|
|
|
|
|
return "remaining";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className={cn("w-full space-y-3", className)}>
|
|
|
|
|
<div className="mb-4 flex items-center gap-2">
|
|
|
|
|
<h3 className="text-sm font-medium text-gray-900">
|
|
|
|
|
{isProposedPlan ? "Proposed" : "Execution"} Plan
|
|
|
|
|
</h3>
|
|
|
|
|
{!isProposedPlan && (
|
|
|
|
|
<span className="text-xs text-gray-500">
|
|
|
|
|
{planItems.filter((item) => item.completed).length} of{" "}
|
|
|
|
|
{planItems.length} completed
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="space-y-2">
|
|
|
|
|
{planItems
|
|
|
|
|
.sort((a, b) => a.index - b.index)
|
|
|
|
|
.map((item) => {
|
|
|
|
|
const status = getTaskStatus(item);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
key={`plan-item-${item.index}`}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-start gap-3 rounded-lg border p-3 transition-colors",
|
|
|
|
|
{
|
|
|
|
|
"border-green-200 bg-green-50": status === "completed",
|
|
|
|
|
"border-blue-200 bg-blue-50": status === "current",
|
|
|
|
|
"border-gray-200 bg-gray-50": [
|
|
|
|
|
"remaining",
|
|
|
|
|
"proposed",
|
|
|
|
|
].includes(status),
|
|
|
|
|
},
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
{/* Status Icon */}
|
|
|
|
|
<div className="mt-0.5 flex-shrink-0">
|
|
|
|
|
{status === "completed" && (
|
|
|
|
|
<Check className="h-4 w-4 text-green-600" />
|
|
|
|
|
)}
|
|
|
|
|
{status === "current" && (
|
|
|
|
|
<Play className="h-4 w-4 text-blue-600" />
|
|
|
|
|
)}
|
|
|
|
|
{["remaining", "proposed"].includes(status) && (
|
|
|
|
|
<Clock className="h-4 w-4 text-gray-400" />
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Task Content */}
|
|
|
|
|
<div className="min-w-0 flex-1">
|
2025-06-13 17:08:26 -07:00
|
|
|
<div className="mb-1 flex items-center justify-between text-gray-500">
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<span className="text-xs font-medium">
|
|
|
|
|
Step {item.index + 1}
|
feat: Update chat UI to be Open SWE specific (#76) (#91)
* init repo-selector
* add branch selector UI, extend GH hook w branch info
* add reconnectOnMount: true resumeStream, remove repo description from selector, fix styling
* styling repo + branch
* udpate getBranch calls to include targetRepo arg
* format
* add search to repo + branch selectors
* add settings icon link to /github for dev convenience
* add default branch selection
* format
* minor cleanup
* init task list UI demo
* individual task component
* tasks real data
* task visual improvement
* persisting tasks, navigate to thread onClick
* task UI
* TaskSidebar, Navigate to tasks
* org tasks by thread
* group by thread
* improve sidebar, task-list, rm github modal on refresh
* collapse sidebar works when viewing a thread
* remove micro-tasks expansion from threads component, change taskId to taskIndex for persistence + simplicity
* init config sidebar ui
* open and close config sidebar
* add ref for getAllTasks + add graph_id metadata
* format
* create threadItem component
* format
* add threadUtils
* centralize + refactor types
* format
* improve thread status, realtime updates
* fix scroll issue
* remove temperature from config-sidebar
* Change model via sidebar
* fix flashing on updates
* init plan UI
* centralize types
* self CR: refactoring, cleanup, remove comments, add todos
* CR: clean comments + logs, fix repo selector bug
* fix: Update example env file in web (#77)
* disable auto scroll on pageload
* reposelector: use default branch not main master
* remove archived tab temp, default branch listed first in branchSelector dropdown
* auto select first repo
* improve status indicator
* refactor status indicator
* simplify status implementation to use Langgraph
* util moved from provider to thread-utils
* linting, improve task completion logic
* feat: Support followup requests (#60)
* feat: Support followup requests
* cr
* cr
* fix
* account for pr already exists
* remove task provider
* fix: Better prompting and context provided for codebase structure awareness (#85)
* fix: Better prompting and context provided for codebase structure awareness
* cr
* linting + skeleton loader
* fix: branch selector, add github api pagination
* small branch update
* update task completion status realtime
* threadItem stream remove flashing/polling
* feat: Create a shared package (#89)
* feat: Create a shared package
* formatting
* fix: drop passing target repo to getBranchName
* drop docs
* use shared package for config fields in config sidebar
* fix: styling and structure for repo/branch selectors
* fix: use shared types/objects for config fields
* default key for configs
* fix: improved styling for threads
* fix renering num tasks
* disable repo branch selector when chat started
* cr
* cr
* bump deps
* fix: rendering plan in interrupt
* cr
* cr
---------
Co-authored-by: Dylan Boudro <121908331+starmorph@users.noreply.github.com>
2025-06-08 17:29:40 -07:00
|
|
|
</span>
|
2025-06-13 17:08:26 -07:00
|
|
|
{status === "current" && (
|
|
|
|
|
<span className="rounded-full bg-blue-100 px-2 py-0.5 text-xs text-blue-700">
|
|
|
|
|
In Progress
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
|
|
|
|
{status === "completed" && (
|
|
|
|
|
<span className="rounded-full bg-green-100 px-2 py-0.5 text-xs text-green-700">
|
|
|
|
|
Done
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
|
|
|
|
{status === "proposed" && (
|
|
|
|
|
<span className="rounded-full bg-gray-100 px-2 py-0.5 text-xs text-gray-700">
|
|
|
|
|
Proposed
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
{isProposedPlan && (
|
|
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
<TooltipIconButton
|
|
|
|
|
onClick={() =>
|
|
|
|
|
setIsEditing((p) => ({
|
|
|
|
|
...p,
|
|
|
|
|
[item.index]: !p[item.index],
|
|
|
|
|
}))
|
|
|
|
|
}
|
|
|
|
|
tooltip={
|
|
|
|
|
isEditing[item.index] ? `Save Plan` : `Edit Plan`
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
{isEditing[item.index] ? (
|
|
|
|
|
<Check className="size-4" />
|
|
|
|
|
) : (
|
|
|
|
|
<Pencil className="size-4" />
|
|
|
|
|
)}
|
|
|
|
|
</TooltipIconButton>
|
|
|
|
|
<TooltipIconButton
|
|
|
|
|
onClick={() =>
|
|
|
|
|
setPlanItems?.((prev) => {
|
|
|
|
|
const newArr = prev.filter(
|
|
|
|
|
(i) => i.index !== item.index,
|
|
|
|
|
);
|
|
|
|
|
return newArr.map((i, index) => ({
|
|
|
|
|
...i,
|
|
|
|
|
index,
|
|
|
|
|
}));
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
tooltip="Delete Plan"
|
|
|
|
|
className="transition-colors hover:text-red-500"
|
|
|
|
|
>
|
|
|
|
|
<Trash className="size-4" />
|
|
|
|
|
</TooltipIconButton>
|
|
|
|
|
</div>
|
feat: Update chat UI to be Open SWE specific (#76) (#91)
* init repo-selector
* add branch selector UI, extend GH hook w branch info
* add reconnectOnMount: true resumeStream, remove repo description from selector, fix styling
* styling repo + branch
* udpate getBranch calls to include targetRepo arg
* format
* add search to repo + branch selectors
* add settings icon link to /github for dev convenience
* add default branch selection
* format
* minor cleanup
* init task list UI demo
* individual task component
* tasks real data
* task visual improvement
* persisting tasks, navigate to thread onClick
* task UI
* TaskSidebar, Navigate to tasks
* org tasks by thread
* group by thread
* improve sidebar, task-list, rm github modal on refresh
* collapse sidebar works when viewing a thread
* remove micro-tasks expansion from threads component, change taskId to taskIndex for persistence + simplicity
* init config sidebar ui
* open and close config sidebar
* add ref for getAllTasks + add graph_id metadata
* format
* create threadItem component
* format
* add threadUtils
* centralize + refactor types
* format
* improve thread status, realtime updates
* fix scroll issue
* remove temperature from config-sidebar
* Change model via sidebar
* fix flashing on updates
* init plan UI
* centralize types
* self CR: refactoring, cleanup, remove comments, add todos
* CR: clean comments + logs, fix repo selector bug
* fix: Update example env file in web (#77)
* disable auto scroll on pageload
* reposelector: use default branch not main master
* remove archived tab temp, default branch listed first in branchSelector dropdown
* auto select first repo
* improve status indicator
* refactor status indicator
* simplify status implementation to use Langgraph
* util moved from provider to thread-utils
* linting, improve task completion logic
* feat: Support followup requests (#60)
* feat: Support followup requests
* cr
* cr
* fix
* account for pr already exists
* remove task provider
* fix: Better prompting and context provided for codebase structure awareness (#85)
* fix: Better prompting and context provided for codebase structure awareness
* cr
* linting + skeleton loader
* fix: branch selector, add github api pagination
* small branch update
* update task completion status realtime
* threadItem stream remove flashing/polling
* feat: Create a shared package (#89)
* feat: Create a shared package
* formatting
* fix: drop passing target repo to getBranchName
* drop docs
* use shared package for config fields in config sidebar
* fix: styling and structure for repo/branch selectors
* fix: use shared types/objects for config fields
* default key for configs
* fix: improved styling for threads
* fix renering num tasks
* disable repo branch selector when chat started
* cr
* cr
* bump deps
* fix: rendering plan in interrupt
* cr
* cr
---------
Co-authored-by: Dylan Boudro <121908331+starmorph@users.noreply.github.com>
2025-06-08 17:29:40 -07:00
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-06-13 17:08:26 -07:00
|
|
|
{isEditing[item.index] ? (
|
|
|
|
|
<Textarea
|
|
|
|
|
value={planItems[item.index].plan}
|
|
|
|
|
onChange={(e) => {
|
|
|
|
|
setPlanItems?.((prev) => {
|
|
|
|
|
return prev.map((i) => {
|
|
|
|
|
if (i.index === item.index) {
|
|
|
|
|
return {
|
|
|
|
|
...i,
|
|
|
|
|
plan: e.target.value,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return i;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<p
|
|
|
|
|
className={cn("text-sm leading-relaxed", {
|
|
|
|
|
"text-gray-900": status === "current",
|
|
|
|
|
"text-gray-600":
|
|
|
|
|
status === "completed" ||
|
|
|
|
|
["remaining", "proposed"].includes(status),
|
|
|
|
|
})}
|
|
|
|
|
>
|
|
|
|
|
{planItems[item.index].plan}
|
|
|
|
|
</p>
|
|
|
|
|
)}
|
feat: Update chat UI to be Open SWE specific (#76) (#91)
* init repo-selector
* add branch selector UI, extend GH hook w branch info
* add reconnectOnMount: true resumeStream, remove repo description from selector, fix styling
* styling repo + branch
* udpate getBranch calls to include targetRepo arg
* format
* add search to repo + branch selectors
* add settings icon link to /github for dev convenience
* add default branch selection
* format
* minor cleanup
* init task list UI demo
* individual task component
* tasks real data
* task visual improvement
* persisting tasks, navigate to thread onClick
* task UI
* TaskSidebar, Navigate to tasks
* org tasks by thread
* group by thread
* improve sidebar, task-list, rm github modal on refresh
* collapse sidebar works when viewing a thread
* remove micro-tasks expansion from threads component, change taskId to taskIndex for persistence + simplicity
* init config sidebar ui
* open and close config sidebar
* add ref for getAllTasks + add graph_id metadata
* format
* create threadItem component
* format
* add threadUtils
* centralize + refactor types
* format
* improve thread status, realtime updates
* fix scroll issue
* remove temperature from config-sidebar
* Change model via sidebar
* fix flashing on updates
* init plan UI
* centralize types
* self CR: refactoring, cleanup, remove comments, add todos
* CR: clean comments + logs, fix repo selector bug
* fix: Update example env file in web (#77)
* disable auto scroll on pageload
* reposelector: use default branch not main master
* remove archived tab temp, default branch listed first in branchSelector dropdown
* auto select first repo
* improve status indicator
* refactor status indicator
* simplify status implementation to use Langgraph
* util moved from provider to thread-utils
* linting, improve task completion logic
* feat: Support followup requests (#60)
* feat: Support followup requests
* cr
* cr
* fix
* account for pr already exists
* remove task provider
* fix: Better prompting and context provided for codebase structure awareness (#85)
* fix: Better prompting and context provided for codebase structure awareness
* cr
* linting + skeleton loader
* fix: branch selector, add github api pagination
* small branch update
* update task completion status realtime
* threadItem stream remove flashing/polling
* feat: Create a shared package (#89)
* feat: Create a shared package
* formatting
* fix: drop passing target repo to getBranchName
* drop docs
* use shared package for config fields in config sidebar
* fix: styling and structure for repo/branch selectors
* fix: use shared types/objects for config fields
* default key for configs
* fix: improved styling for threads
* fix renering num tasks
* disable repo branch selector when chat started
* cr
* cr
* bump deps
* fix: rendering plan in interrupt
* cr
* cr
---------
Co-authored-by: Dylan Boudro <121908331+starmorph@users.noreply.github.com>
2025-06-08 17:29:40 -07:00
|
|
|
|
|
|
|
|
{/* Summary for completed tasks */}
|
|
|
|
|
{item.summary && status === "completed" && (
|
|
|
|
|
<div className="bg-green-25 mt-2 rounded border border-green-100 p-2">
|
|
|
|
|
<p className="mb-1 text-xs font-medium text-green-700">
|
|
|
|
|
Summary:
|
|
|
|
|
</p>
|
|
|
|
|
<p className="text-xs text-green-600">{item.summary}</p>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2025-06-13 17:08:26 -07:00
|
|
|
{isProposedPlan && (
|
|
|
|
|
<div
|
|
|
|
|
key="add-new-plan-item"
|
|
|
|
|
className="flex items-start gap-3 rounded-lg border border-gray-200 bg-gray-50 p-3 transition-colors"
|
|
|
|
|
>
|
|
|
|
|
<Textarea
|
|
|
|
|
placeholder="Add new plan item"
|
|
|
|
|
value={newPlanItem}
|
|
|
|
|
onChange={(e) => setNewPlanItem(e.target.value)}
|
|
|
|
|
/>
|
|
|
|
|
<Button
|
|
|
|
|
onClick={() => {
|
|
|
|
|
setPlanItems?.((prev) => [
|
|
|
|
|
...prev,
|
|
|
|
|
{
|
|
|
|
|
index: prev.length,
|
|
|
|
|
plan: newPlanItem,
|
|
|
|
|
completed: false,
|
|
|
|
|
summary: undefined,
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
setNewPlanItem("");
|
|
|
|
|
}}
|
|
|
|
|
className="mt-auto"
|
|
|
|
|
size="sm"
|
|
|
|
|
variant="outline"
|
|
|
|
|
>
|
|
|
|
|
Add
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
feat: Update chat UI to be Open SWE specific (#76) (#91)
* init repo-selector
* add branch selector UI, extend GH hook w branch info
* add reconnectOnMount: true resumeStream, remove repo description from selector, fix styling
* styling repo + branch
* udpate getBranch calls to include targetRepo arg
* format
* add search to repo + branch selectors
* add settings icon link to /github for dev convenience
* add default branch selection
* format
* minor cleanup
* init task list UI demo
* individual task component
* tasks real data
* task visual improvement
* persisting tasks, navigate to thread onClick
* task UI
* TaskSidebar, Navigate to tasks
* org tasks by thread
* group by thread
* improve sidebar, task-list, rm github modal on refresh
* collapse sidebar works when viewing a thread
* remove micro-tasks expansion from threads component, change taskId to taskIndex for persistence + simplicity
* init config sidebar ui
* open and close config sidebar
* add ref for getAllTasks + add graph_id metadata
* format
* create threadItem component
* format
* add threadUtils
* centralize + refactor types
* format
* improve thread status, realtime updates
* fix scroll issue
* remove temperature from config-sidebar
* Change model via sidebar
* fix flashing on updates
* init plan UI
* centralize types
* self CR: refactoring, cleanup, remove comments, add todos
* CR: clean comments + logs, fix repo selector bug
* fix: Update example env file in web (#77)
* disable auto scroll on pageload
* reposelector: use default branch not main master
* remove archived tab temp, default branch listed first in branchSelector dropdown
* auto select first repo
* improve status indicator
* refactor status indicator
* simplify status implementation to use Langgraph
* util moved from provider to thread-utils
* linting, improve task completion logic
* feat: Support followup requests (#60)
* feat: Support followup requests
* cr
* cr
* fix
* account for pr already exists
* remove task provider
* fix: Better prompting and context provided for codebase structure awareness (#85)
* fix: Better prompting and context provided for codebase structure awareness
* cr
* linting + skeleton loader
* fix: branch selector, add github api pagination
* small branch update
* update task completion status realtime
* threadItem stream remove flashing/polling
* feat: Create a shared package (#89)
* feat: Create a shared package
* formatting
* fix: drop passing target repo to getBranchName
* drop docs
* use shared package for config fields in config sidebar
* fix: styling and structure for repo/branch selectors
* fix: use shared types/objects for config fields
* default key for configs
* fix: improved styling for threads
* fix renering num tasks
* disable repo branch selector when chat started
* cr
* cr
* bump deps
* fix: rendering plan in interrupt
* cr
* cr
---------
Co-authored-by: Dylan Boudro <121908331+starmorph@users.noreply.github.com>
2025-06-08 17:29:40 -07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|