mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-04 17:12:11 +00:00
* feat: per-repo custom instructions for the coding agent Adds per-repository custom instructions for the main coding agent, mirroring the reviewer's per-repo style prompts. Instructions are stored in the LangGraph Store, managed via dashboard API + UI (Monaco editor), and appended to the agent's system prompt for runs targeting that repo. Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> * chore: wire agent instructions route into generated route tree Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> * fix: enforce repo access on instruction routes Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import { Navigate, createFileRoute } from "@tanstack/react-router";
|
|
|
|
import { AgentInstructionsPanel } from "@/components/AgentInstructionsPanel";
|
|
import { AppShell } from "@/components/AppShell";
|
|
import { Skeleton } from "@/components/ui/skeleton";
|
|
import { useSession } from "@/lib/session";
|
|
|
|
export const Route = createFileRoute("/agents_/instructions")({
|
|
component: AgentInstructionsPage,
|
|
});
|
|
|
|
function AgentInstructionsPage() {
|
|
const session = useSession();
|
|
|
|
if (session.isLoading) {
|
|
return (
|
|
<main className="p-6">
|
|
<Skeleton className="h-64 w-full" />
|
|
</main>
|
|
);
|
|
}
|
|
if (!session.data) return <Navigate to="/login" />;
|
|
|
|
return (
|
|
<AppShell
|
|
user={session.data}
|
|
title="Repository Instructions"
|
|
description="Per-repo custom instructions appended to the coding agent's system prompt for runs targeting that repository."
|
|
backTo={{ to: "/cloud-agents", label: "Back to Open SWE Agent" }}
|
|
>
|
|
<div className="rounded-lg border border-border bg-card">
|
|
<AgentInstructionsPanel />
|
|
</div>
|
|
</AppShell>
|
|
);
|
|
}
|