Skip to content

🙌 OpenHands: AI-Driven Development

feat: add automate setup split panel (#17200)

Rohit Malhotrafabfaac8a8e3
diff --git a/__tests__/api/automation-setup-handoff-store.test.ts b/__tests__/api/automation-setup-handoff-store.test.ts
new file mode 100644
index 0000000000..4d3dfe9fcd
--- /dev/null
+++ b/__tests__/api/automation-setup-handoff-store.test.ts
@@ -0,0 +1,19 @@
+import { beforeEach, describe, expect, it } from "vitest";
+import {
+ consumeAutomationSetupHandoff,
+ markAutomationSetupHandoff,
+} from "#/api/automation-setup-handoff-store";
+
+describe("automation setup handoff store", () => {
+ beforeEach(() => {
+ window.sessionStorage.clear();
+ });
+
+ it("keeps a handoff readable for the browser session", () => {
+ markAutomationSetupHandoff("conversation-1");
+
+ expect(consumeAutomationSetupHandoff("conversation-1")).toBe(true);
+ expect(consumeAutomationSetupHandoff("conversation-1")).toBe(true);
+ expect(consumeAutomationSetupHandoff("conversation-2")).toBe(false);
+ });
+});
diff --git a/__tests__/api/git-provider-items-service.test.ts b/__tests__/api/git-provider-items-service.test.ts
index f63b1d7c67..1df2994b68 100644
--- a/__tests__/api/git-provider-items-service.test.ts
+++ b/__tests__/api/git-provider-items-service.test.ts
@@ -28,6 +28,7 @@ beforeEach(() => {
setRegisteredBackends([cloudBackend]);
setActiveSelection({ backendId: cloudBackend.id });
fetchMock.mockReset();
+ vi.restoreAllMocks();
global.fetch = fetchMock as unknown as typeof fetch;
});
@@ -35,6 +36,7 @@ afterEach(() => {
window.localStorage.clear();
__resetActiveStoreForTests();
fetchMock.mockReset();
+ vi.restoreAllMocks();
global.fetch = originalFetch;
});
@@ -105,4 +107,5 @@ describe("GitProviderItemsService", () => {
expect(items).toHaveLength(1);
expect(items[0].title).toBe("Real issue");
});
+
});
diff --git a/__tests__/api/git-service.test.ts b/__tests__/api/git-service.test.ts
index bfef4645fb..afa5aab9f1 100644
--- a/__tests__/api/git-service.test.ts
+++ b/__tests__/api/git-service.test.ts
@@ -9,6 +9,8 @@ const workspaceMocks = vi.hoisted(() => ({
resolveWorkingDir: vi.fn(),
clientOptions: vi.fn(),
mapStatus: vi.fn(),
+ searchRepositories: vi.fn(),
+ closeGitClient: vi.fn(),
}));
vi.mock("#/api/cloud/git-service.api", () => ({
@@ -21,6 +23,15 @@ vi.mock("#/api/backend-registry/active-store", () => ({
getActiveBackend: vi.fn(),
}));
+vi.mock("@openhands/typescript-client/clients", () => ({
+ GitClient: vi.fn(function GitClientMock() {
+ return {
+ searchRepositories: workspaceMocks.searchRepositories,
+ close: workspaceMocks.closeGitClient,
+ };
+ }),
+}));
+
vi.mock("@openhands/typescript-client/workspace/remote-workspace", () => ({
RemoteWorkspace: vi.fn(function RemoteWorkspaceMock() {
return {
@@ -88,6 +99,11 @@ describe("GitService", () => {
workspaceMocks.resolveWorkingDir.mockResolvedValue("/workspace/project");
workspaceMocks.clientOptions.mockReturnValue({ host: "http://localhost" });
workspaceMocks.mapStatus.mockImplementation((status) => `mapped:${status}`);
+ workspaceMocks.searchRepositories.mockResolvedValue({
+ items: [],
+ next_page_id: null,
+ missing_token: false,
+ });
});
afterEach(() => {
@@ -231,13 +247,43 @@ describe("GitService", () => {
expect(result.items).toHaveLength(1);
});
- it("should short-circuit to empty results when provider is valid but local backend is active", async () => {
+ it("uses the typed Agent Server GitClient when a local backend is active", async () => {
localActive();
+ workspaceMocks.searchRepositories.mockResolvedValue({
+ items: [
+ {
+ id: "1",
+ full_name: "owner/repo",
+ git_provider: "github",
+ is_public: true,
+ },
+ ],
+ next_page_id: "next",
+ missing_token: false,
+ });
const result = await GitService.searchGitRepositories("test", "github");
- expect(result).toEqual({ items: [], next_page_id: null });
+ expect(workspaceMocks.clientOptions).toHaveBeenCalledWith();
+ expect(workspaceMocks.searchRepositories).toHaveBeenCalledWith({
+ provider: "github",
+ query: "test",
+ limit: 100,
+ pageId: undefined,
+ });
expect(mockSearchCloudRepositories).not.toHaveBeenCalled();
+ expect(result).toEqual({
+ items: [
+ {
+ id: "1",
+ full_name: "owner/repo",
+ git_provider: "github",
+ is_public: true,
+ },
+ ],
+ next_page_id: "next",
+ missing_token: false,
+ });
});
it("routes every supported cloud lookup with normalized parameters", async () => {
@@ -327,11 +373,26 @@ describe("GitService", () => {
});
});
- it("short-circuits every cloud-only lookup for a local backend", async () => {
+ it("uses GitClient for local direct repo listing and keeps other cloud-only lookups empty", async () => {
localActive();
+ workspaceMocks.searchRepositories.mockResolvedValue({
+ items: [],
+ next_page_id: null,
+ missing_token: true,
+ });
+
await expect(
- GitService.retrieveUserGitRepositories("github"),
- ).resolves.toEqual({ items: [], next_page_id: null });
+ GitService.retrieveUserGitRepositories("github", "next", 6),
+ ).resolves.toEqual({
+ items: [],
+ next_page_id: null,
+ missing_token: true,
+ });
+ expect(workspaceMocks.searchRepositories).toHaveBeenCalledWith({
+ provider: "github",
+ limit: 6,
+ pageId: "next",
+ });
await expect(
GitService.retrieveInstallationRepositories("github", 0, ["install"]),
).resolves.toEqual({ items: [], next_page_id: null });
diff --git a/__tests__/components/automations/automation-setup-panel.test.tsx b/__tests__/components/automations/automation-setup-panel.test.tsx
new file mode 100644
index 0000000000..adaddabafc
--- /dev/null
+++ b/__tests__/components/automations/automation-setup-panel.test.tsx
@@ -0,0 +1,297 @@
+import { render, screen, waitFor } from "@testing-library/react";
+import userEvent from "@testing-library/user-event";
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import {
+ NavigationProvider,
+ type NavigationContextValue,
+} from "#/context/navigation-context";
+import { AutomationSetupPanel } from "#/components/features/automations/setup/automation-setup-panel";
+import AutomationService from "#/api/automation-service/automation-service.api";
+import type { AutomationSetupDraft } from "#/api/automation-setup-types";
+import { packTarGzip } from "#/utils/tar-gzip";
+
+const mockNavigate = vi.fn();
+const mockToastSuccess = vi.fn();
+const mockUseGitRepositories = vi.fn(() => ({
+ data: { pages: [] },
+ isError: false,
+ isLoading: false,
+ onLoadMore: vi.fn(),
+}));
+
+vi.mock("react-hot-toast", () => ({
+ default: { success: (...args: unknown[]) => mockToastSuccess(...args) },
+}));
+
+vi.mock("react-i18next", () => ({
+ useTranslation: () => ({ t: (key: string) => key }),
+}));
+
+vi.mock("#/utils/custom-toast-handlers", () => ({
+ displayErrorToast: vi.fn(),
+}));
+
+vi.mock("#/api/automation-service/automation-service.api", () => ({
+ default: {
+ validateDraft: vi.fn(),
+ createAutomationDraft: vi.fn(),
+ uploadAutomationTarball: vi.fn(),
+ },
+}));
+
+vi.mock("#/utils/tar-gzip", () => ({
+ packTarGzip: vi.fn().mockResolvedValue(new Uint8Array([1, 2, 3])),
+}));
+
+vi.mock("#/manifests/automation-interface", () => ({
+ automationDetailPath: (id: string) => `/automations/${id}`,
+ getAutomationEndpoint: (name: string) =>
+ name === "createPlugin"
+ ? "/v1/preset/plugin"
+ : name === "createBundle"
+ ? "/v1"
+ : "/v1/preset/prompt",
+}));
+
+vi.mock("#/hooks/query/use-llm-profiles", () => ({
+ useLlmProfiles: () => ({
+ data: { active_profile: "default", profiles: [] },
+ isLoading: false,
+ }),
+}));
+
+vi.mock("#/hooks/query/use-agent-profiles", () => ({
+ useAgentProfiles: () => ({
+ data: { active_agent_profile_id: null, profiles: [] },
+ isLoading: false,
+ }),
+}));
+
+vi.mock("#/hooks/use-user-providers", () => ({
+ useUserProviders: () => ({ providers: [] }),
+}));
+
+vi.mock("#/hooks/query/use-git-repositories", () => ({
+ useGitRepositories: () => mockUseGitRepositories(),
+}));
+
+function renderPanel(
+ draft: AutomationSetupDraft = {
+ prompt: "Review every pull request",
+ kind: "prompt",
+ },
+) {
+ const value: NavigationContextValue = {
+ currentPath: "/conversations/conv-1",
+ conversationId: "conv-1",
+ isNavigating: false,
+ navigate: mockNavigate,
+ };
+
+ return render(
+ <NavigationProvider value={value}>
+ <AutomationSetupPanel draft={draft} />
+ </NavigationProvider>,
+ );
+}
+
+describe("AutomationSetupPanel", () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ mockUseGitRepositories.mockReturnValue({
+ data: { pages: [] },
+ isError: false,
+ isLoading: false,
+ onLoadMore: vi.fn(),
+ });
+ });
+
+ it("switches between prompt, plugin, and custom form types", async () => {
+ const user = userEvent.setup();
+ renderPanel();
+
+ expect(screen.getByTestId("automation-setup-prompt")).toHaveValue(
+ "Review every pull request",
+ );
+ expect(screen.getByTestId("automation-setup-save-draft")).toBeDisabled();
+
+ await user.click(screen.getByTestId("automation-setup-add-plugin"));
+ expect(
+ screen.getByTestId("automation-setup-plugin-source"),
+ ).toBeInTheDocument();
+
+ await user.click(screen.getByTestId("automation-setup-kind-custom"));
+ expect(screen.getByTestId("automation-setup-entrypoint")).toHaveValue(
+ "python3 main.py",
+ );
+ expect(
+ screen.getByTestId("automation-setup-setup-script-path"),
+ ).toHaveValue("setup.sh");
+ expect(
+ (
+ screen.getByTestId(
+ "automation-setup-custom-code",
+ ) as HTMLTextAreaElement
+ ).value,
+ ).toContain("Review every pull request");
+ expect(
+ screen.queryByTestId("automation-setup-rendered-code"),
+ ).not.toBeInTheDocument();
+ expect(
+ screen.queryByTestId("automation-setup-prompt"),
+ ).not.toBeInTheDocument();
+ });
+
+ it("validates the prompt draft against the automation service", async () => {
+ vi.mocked(AutomationService.validateDraft).mockResolvedValue({
+ valid: true,
+ errors: [],
+ });
+
+ const user = userEvent.setup();
+ renderPanel();
+
+ await user.click(screen.getByTestId("automation-setup-test"));
+
+ await waitFor(() =>
+ expect(AutomationService.validateDraft).toHaveBeenCalledWith({
+ endpoint: "/v1/preset/prompt",
+ draft: expect.objectContaining({
+ enabled: false,
+ prompt: "Review every pull request",
+ trigger: {
+ type: "cron",
+ schedule: "0 9 * * *",
+ timezone: "America/New_York",
+ },
+ }),
+ }),
+ );
+ expect(screen.getByTestId("automation-setup-status")).toHaveTextContent(
+ "AUTOMATION_SETUP$TEST_PASSED",
+ );
+ });
+
+ it("sends each comma-separated repository to the automation service", async () => {
+ vi.mocked(AutomationService.validateDraft).mockResolvedValue({
+ valid: true,
+ errors: [],
+ });
+
+ const user = userEvent.setup();
+ renderPanel();
+
+ await user.click(screen.getByTestId("automation-setup-repository-add"));
+ await user.click(screen.getByTestId("automation-setup-repository-custom"));
+ await user.type(
+ screen.getByTestId("automation-setup-repository-address"),
+ "OpenHands/OpenHands, https://gitlab.com/acme/project",
+ );
+ await user.click(screen.getByTestId("automation-setup-repository-submit"));
+ await user.click(screen.getByTestId("automation-setup-test"));
+
+ await waitFor(() =>
+ expect(AutomationService.validateDraft).toHaveBeenCalledWith(
+ expect.objectContaining({
+ draft: expect.objectContaining({
+ repos: [
+ { url: "OpenHands/OpenHands", provider: "github" },
+ { url: "https://gitlab.com/acme/project" },
+ ],
+ }),
+ }),
+ ),
+ );
+ });
+
+ it("shows a repository loading error in the repository picker", async () => {
+ mockUseGitRepositories.mockReturnValue({
+ data: { pages: [] },
+ isError: true,
+ isLoading: false,
+ onLoadMore: vi.fn(),
+ });
+
+ const user = userEvent.setup();
+ renderPanel();
+
+ await user.click(screen.getByTestId("automation-setup-repository-add"));
+
+ expect(
+ screen.getByTestId("automation-setup-repository-error"),
+ ).toHaveTextContent("HOME$FAILED_TO_LOAD_REPOSITORIES");
+ expect(
+ screen.queryByTestId("automation-setup-repository-loading"),
+ ).not.toBeInTheDocument();
+ });
+
+ it("creates plugin drafts with the selected plugin source", async () => {
+ vi.mocked(AutomationService.createAutomationDraft).mockResolvedValue({
+ id: "automation-1",
+ });
+
+ const user = userEvent.setup();
+ renderPanel({
+ prompt: "Summarize Slack blockers",
+ kind: "plugin",
+ plugins: ["github:org/blockers-plugin"],
+ });
+
+ await user.click(screen.getByTestId("automation-setup-create"));
+
+ await waitFor(() =>
+ expect(AutomationService.createAutomationDraft).toHaveBeenCalledWith(
+ expect.objectContaining({
+ enabled: false,
+ prompt: "Summarize Slack blockers",
+ plugins: [{ source: "github:org/blockers-plugin" }],
+ }),
+ "plugin",
+ ),
+ );
+ expect(mockNavigate).toHaveBeenCalledWith("/automations/automation-1");
+ });
+
+ it("creates custom bundle drafts with entrypoint and setup script path", async () => {
+ vi.mocked(AutomationService.uploadAutomationTarball).mockResolvedValue(
+ "oh-internal://uploads/custom-archive",
+ );
+ vi.mocked(AutomationService.createAutomationDraft).mockResolvedValue({
+ id: "automation-custom",
+ });
+
+ const user = userEvent.setup();
+ renderPanel({
+ prompt: "Run a custom security check",
+ kind: "custom",
+ });
+
+ await user.clear(screen.getByTestId("automation-setup-entrypoint"));
+ await user.type(
+ screen.getByTestId("automation-setup-entrypoint"),
+ "python3 main.py --once",
+ );
+ await user.click(screen.getByTestId("automation-setup-create"));
+
+ await waitFor(() =>
+ expect(AutomationService.uploadAutomationTarball).toHaveBeenCalledWith(
+ "Run A Custom Security",
+ new Uint8Array([1, 2, 3]),
+ ),
+ );
+ expect(packTarGzip).toHaveBeenCalledWith([
+ expect.objectContaining({ name: "main.py", mode: 0o644 }),
+ expect.objectContaining({ name: "setup.sh", mode: 0o755 }),
+ ]);
+ expect(AutomationService.createAutomationDraft).toHaveBeenCalledWith(
+ expect.objectContaining({
+ tarball_path: "oh-internal://uploads/custom-archive",
+ entrypoint: "python3 main.py --once",
+ enabled: false,
+ setup_script_path: "setup.sh",
+ }),
+ "custom",
+ );
+ expect(mockNavigate).toHaveBeenCalledWith("/automations/automation-custom");
+ });
+});
diff --git a/__tests__/components/features/conversation/conversation-main.test.tsx b/__tests__/components/features/conversation/conversation-main.test.tsx
index 966905fdb7..9cdfeba906 100644
--- a/__tests__/components/features/conversation/conversation-main.test.tsx
+++ b/__tests__/components/features/conversation/conversation-main.test.tsx
@@ -1,15 +1,30 @@
-import { render, screen } from "@testing-library/react";
+import { act, render, screen } from "@testing-library/react";
+import userEvent from "@testing-library/user-event";
import { describe, it, expect, vi, beforeEach } from "vitest";
import { SidebarMobileNavProvider } from "#/components/features/sidebar/sidebar-mobile-nav-context";
+import {
+ NavigationProvider,
+ type NavigationContextValue,
+} from "#/context/navigation-context";
+import { requestAutomationSetupAgent } from "#/components/features/automations/setup/automation-setup-agent-request";
// Mutable mock state for controlling breakpoint
let mockIsMobile = false;
let mockIsRightPanelShown = false;
let mockLeftWidth = 50;
+let mockHasAutomationSetupHandoff = false;
+
+const mockNavigate = vi.fn();
+const mockSetHasRightPanelToggled = vi.fn();
+const mockSetIsRightPanelShown = vi.fn();
// Track ChatInterface unmount via vi.fn()
const chatInterfaceUnmount = vi.fn();
+vi.mock("react-i18next", () => ({
+ useTranslation: () => ({ t: (key: string) => key }),
+}));
+
vi.mock("#/hooks/use-breakpoint", () => ({
useBreakpoint: () => mockIsMobile,
SIDEBAR_RAIL_COLLAPSE_MAX_WIDTH: 767,
@@ -28,6 +43,18 @@ vi.mock("#/hooks/use-resizable-panels", () => ({
vi.mock("#/stores/conversation-store", () => ({
useConversationStore: () => ({
isRightPanelShown: mockIsRightPanelShown,
+ setHasRightPanelToggled: mockSetHasRightPanelToggled,
+ setIsRightPanelShown: mockSetIsRightPanelShown,
+ }),
+}));
+
+vi.mock("#/api/automation-setup-handoff-store", () => ({
+ consumeAutomationSetupHandoff: () => mockHasAutomationSetupHandoff,
+}));
+
+vi.mock("#/hooks/query/use-active-conversation", () => ({
+ useActiveConversation: () => ({
+ data: { title: "Daily Morning Haiku" },
}),
}));
@@ -35,12 +62,50 @@ vi.mock("#/stores/conversation-store", () => ({
vi.mock("#/components/features/chat/chat-interface", () => {
// eslint-disable-next-line @typescript-eslint/no-require-imports
const React = require("react");
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
+ const { createPortal } = require("react-dom");
return {
- ChatInterface: () => {
+ ChatInterface: ({
+ showGitControlBar = true,
+ showEmptyStateSuggestions = true,
+ composerDockTarget = null,
+ onDockedComposerSubmit,
+ minimalComposer = false,
+ composerPlaceholder,
+ }: {
+ showGitControlBar?: boolean;
+ showEmptyStateSuggestions?: boolean;
+ composerDockTarget?: HTMLElement | null;
+ onDockedComposerSubmit?: () => void;
+ minimalComposer?: boolean;
+ composerPlaceholder?: string;
+ }) => {
React.useEffect(() => {
return () => chatInterfaceUnmount();
}, []);
- return <div data-testid="chat-interface">Chat Interface</div>;
+ return (
+ <>
+ <div
+ data-testid="chat-interface"
+ data-show-git-control-bar={showGitControlBar ? "true" : "false"}
+ data-show-empty-state-suggestions={
+ showEmptyStateSuggestions ? "true" : "false"
+ }
+ data-minimal-composer={minimalComposer ? "true" : "false"}
+ data-composer-placeholder={composerPlaceholder}
+ />
+ {composerDockTarget
+ ? createPortal(
+ <button
+ type="button"
+ data-testid="docked-composer-submit"
+ onClick={() => onDockedComposerSubmit?.()}
+ />,
+ composerDockTarget,
+ )
+ : null}
+ </>
+ );
},
};
});
@@ -71,87 +136,277 @@ vi.mock(
}),
);
+vi.mock(
+ "#/components/features/automations/setup/automation-setup-panel",
+ () => {
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
+ const { createPortal } = require("react-dom");
+ return {
+ AutomationSetupPanel: ({
+ toolbarPortal,
+ }: {
+ toolbarPortal?: HTMLElement | null;
+ }) => (
+ <>
+ {toolbarPortal
+ ? createPortal(
+ <button type="button" data-testid="automation-setup-create" />,
+ toolbarPortal,
+ )
+ : null}
+ <div data-testid="automation-setup-panel" />
+ </>
+ ),
+ };
+ },
+);
+
import { ConversationMain } from "#/components/features/conversation/conversation-main/conversation-main";
-function renderConversationMain() {
- return render(
- <SidebarMobileNavProvider>
- <ConversationMain />
- </SidebarMobileNavProvider>,
+function conversationMainTree() {
+ const navigation: NavigationContextValue = {
+ currentPath: "/conversations/conv-1",
+ conversationId: "conv-1",
+ isNavigating: false,
+ navigate: mockNavigate,
+ };
+
+ return (
+ <NavigationProvider value={navigation}>
+ <SidebarMobileNavProvider>
+ <ConversationMain />
+ </SidebarMobileNavProvider>
+ </NavigationProvider>
);
}
+function renderConversationMain() {
+ return render(conversationMainTree());
+}
+
describe("ConversationMain - Layout Transition Stability", () => {
beforeEach(() => {
mockIsMobile = false;
mockIsRightPanelShown = false;
mockLeftWidth = 50;
+ mockHasAutomationSetupHandoff = false;
chatInterfaceUnmount.mockClear();
+ mockNavigate.mockClear();
+ mockSetHasRightPanelToggled.mockClear();
+ mockSetIsRightPanelShown.mockClear();
});
- it("renders ChatInterface at desktop width", () => {
- mockIsMobile = false;
+ it.each([
+ ["desktop", false],
+ ["mobile", true],
+ ])("renders ChatInterface at %s width", (_name, isMobile) => {
+ mockIsMobile = isMobile;
renderConversationMain();
expect(screen.getByTestId("chat-interface")).toBeInTheDocument();
});
- it("renders ChatInterface at mobile width", () => {
- mockIsMobile = true;
- renderConversationMain();
- expect(screen.getByTestId("chat-interface")).toBeInTheDocument();
- });
+ it.each([
+ ["desktop to mobile", false, true],
+ ["mobile to desktop", true, false],
+ ])(
+ "does not unmount ChatInterface when crossing from %s",
+ (_name, initialIsMobile, nextIsMobile) => {
+ mockIsMobile = initialIsMobile;
+ const { rerender } = renderConversationMain();
+ expect(chatInterfaceUnmount).not.toHaveBeenCalled();
+
+ mockIsMobile = nextIsMobile;
+ rerender(conversationMainTree());
+
+ expect(chatInterfaceUnmount).not.toHaveBeenCalled();
+ expect(screen.getByTestId("chat-interface")).toBeInTheDocument();
+ },
+ );
- it("does not unmount ChatInterface when crossing from desktop to mobile", () => {
+ it("survives rapid back-and-forth resize without unmounting ChatInterface", () => {
mockIsMobile = false;
const { rerender } = renderConversationMain();
- expect(chatInterfaceUnmount).not.toHaveBeenCalled();
- // Cross the breakpoint to mobile
- mockIsMobile = true;
- rerender(
- <SidebarMobileNavProvider>
- <ConversationMain />
- </SidebarMobileNavProvider>,
- );
+ // Simulate rapid resize back and forth across the breakpoint
+ for (const mobile of [true, false, true, false, true]) {
+ mockIsMobile = mobile;
+ rerender(conversationMainTree());
+ }
- // ChatInterface must NOT have been unmounted and remounted
expect(chatInterfaceUnmount).not.toHaveBeenCalled();
expect(screen.getByTestId("chat-interface")).toBeInTheDocument();
});
- it("does not unmount ChatInterface when crossing from mobile to desktop", () => {
+ it("uses a single automation setup top bar with splash back navigation", async () => {
+ const user = userEvent.setup();
+ mockIsRightPanelShown = true;
+ mockHasAutomationSetupHandoff = true;
+
+ renderConversationMain();
+
+ expect(screen.getByTestId("automation-setup-topbar")).toBeInTheDocument();
+ expect(screen.queryByTestId("chat-pane-header")).not.toBeInTheDocument();
+ expect(
+ screen.getByTestId("automation-setup-conversation-title"),
+ ).toHaveTextContent("Daily Morning Haiku");
+ expect(screen.getByTestId("automation-setup-create")).toBeInTheDocument();
+ expect(screen.getByTestId("chat-interface")).toHaveAttribute(
+ "data-show-git-control-bar",
+ "false",
+ );
+ expect(screen.getByTestId("chat-interface")).toHaveAttribute(
+ "data-show-empty-state-suggestions",
+ "false",
+ );
+ expect(screen.getByTestId("chat-interface")).toHaveAttribute(
+ "data-composer-placeholder",
+ "AUTOMATION_SETUP$CONVERSATION_COMPOSER_PLACEHOLDER",
+ );
+
+ await user.click(screen.getByTestId("automation-setup-back"));
+
+ expect(mockNavigate).toHaveBeenCalledWith("/");
+ });
+
+ it("keeps the automation form on a narrow window and toggles to the styled conversation", async () => {
+ const user = userEvent.setup();
mockIsMobile = true;
- const { rerender } = renderConversationMain();
- expect(chatInterfaceUnmount).not.toHaveBeenCalled();
+ mockIsRightPanelShown = true;
+ mockHasAutomationSetupHandoff = true;
- // Cross the breakpoint to desktop
- mockIsMobile = false;
- rerender(
- <SidebarMobileNavProvider>
- <ConversationMain />
- </SidebarMobileNavProvider>,
+ renderConversationMain();
+
+ expect(screen.getByTestId("automation-setup-topbar")).toBeInTheDocument();
+ expect(screen.getByTestId("automation-setup-panel")).toBeInTheDocument();
+ expect(
+ screen.getByTestId("automation-setup-docked-composer"),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByTestId("automation-setup-mobile-view-form"),
+ ).toHaveAttribute("aria-label", "AUTOMATION_SETUP$VIEW_FORM");
+ expect(
+ screen.getByTestId("automation-setup-mobile-view-conversation"),
+ ).toHaveAttribute("aria-label", "AUTOMATION_SETUP$VIEW_CONVERSATION");
+ expect(screen.queryByTestId("chat-pane-header")).not.toBeInTheDocument();
+ expect(screen.getByTestId("conversation-chat-panel")).toHaveClass("hidden");
+
+ await user.click(
+ screen.getByTestId("automation-setup-mobile-view-conversation"),
);
- // ChatInterface must NOT have been unmounted and remounted
- expect(chatInterfaceUnmount).not.toHaveBeenCalled();
- expect(screen.getByTestId("chat-interface")).toBeInTheDocument();
+ expect(
+ screen.queryByTestId("automation-setup-mobile-form"),
+ ).not.toBeInTheDocument();
+ expect(
+ screen.queryByTestId("automation-setup-docked-composer"),
+ ).not.toBeInTheDocument();
+ expect(screen.queryByTestId("chat-pane-header")).not.toBeInTheDocument();
+ expect(screen.getByTestId("conversation-chat-panel")).not.toHaveClass(
+ "hidden",
+ );
+ expect(screen.getByTestId("chat-interface")).toHaveAttribute(
+ "data-show-git-control-bar",
+ "false",
+ );
+ expect(screen.getByTestId("chat-interface")).toHaveAttribute(
+ "data-show-empty-state-suggestions",
+ "false",
+ );
+ expect(screen.getByTestId("chat-interface")).toHaveAttribute(
+ "data-minimal-composer",
+ "true",
+ );
+ expect(screen.getByTestId("automation-setup-topbar")).toHaveClass(
+ "flex-col",
+ );
+
+ await user.click(screen.getByTestId("automation-setup-mobile-view-form"));
+
+ expect(
+ screen.getByTestId("automation-setup-mobile-form"),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByTestId("automation-setup-docked-composer"),
+ ).toBeInTheDocument();
+
+ await user.click(screen.getByTestId("docked-composer-submit"));
+
+ expect(
+ screen.queryByTestId("automation-setup-mobile-form"),
+ ).not.toBeInTheDocument();
+
+ await user.click(screen.getByTestId("automation-setup-mobile-view-form"));
+
+ act(() => {
+ requestAutomationSetupAgent();
+ });
+
+ expect(
+ screen.queryByTestId("automation-setup-mobile-form"),
+ ).not.toBeInTheDocument();
+ expect(screen.getByTestId("conversation-chat-panel")).not.toHaveClass(
+ "hidden",
+ );
});
- it("survives rapid back-and-forth resize without unmounting ChatInterface", () => {
- mockIsMobile = false;
- const { rerender } = renderConversationMain();
+ it("expands the automation form to full width when hiding the agent", async () => {
+ const user = userEvent.setup();
+ mockIsRightPanelShown = true;
+ mockHasAutomationSetupHandoff = true;
- // Simulate rapid resize back and forth across the breakpoint
- for (const mobile of [true, false, true, false, true]) {
- mockIsMobile = mobile;
- rerender(
- <SidebarMobileNavProvider>
- <ConversationMain />
- </SidebarMobileNavProvider>,
- );
- }
+ renderConversationMain();
- expect(chatInterfaceUnmount).not.toHaveBeenCalled();
- expect(screen.getByTestId("chat-interface")).toBeInTheDocument();
+ expect(screen.getByTestId("conversation-chat-panel")).toHaveStyle({
+ width: "50%",
+ });
+ expect(screen.getByTestId("conversation-right-panel")).toHaveStyle({
+ width: "50%",
+ });
+ expect(
+ screen.queryByTestId("automation-setup-docked-composer"),
+ ).not.toBeInTheDocument();
+
+ await user.click(screen.getByTestId("automation-setup-agent-toggle"));
+
+ expect(screen.getByTestId("conversation-chat-panel")).toHaveStyle({
+ width: "0%",
+ });
+ expect(screen.getByTestId("conversation-right-panel")).toHaveStyle({
+ width: "100%",
+ });
+ expect(
+ screen.getByTestId("automation-setup-docked-composer"),
+ ).toBeInTheDocument();
+ expect(screen.getByTestId("docked-composer-submit")).toBeInTheDocument();
});
+
+ it.each(["docked composer submit", "setup form help request"])(
+ "reveals the agent from %s",
+ async (trigger) => {
+ const user = userEvent.setup();
+ mockIsRightPanelShown = true;
+ mockHasAutomationSetupHandoff = true;
+
+ renderConversationMain();
+ await user.click(screen.getByTestId("automation-setup-agent-toggle"));
+ expect(screen.getByTestId("conversation-chat-panel")).toHaveStyle({
+ width: "0%",
+ });
+
+ if (trigger === "docked composer submit") {
+ await user.click(screen.getByTestId("docked-composer-submit"));
+ } else {
+ act(() => {
+ requestAutomationSetupAgent();
+ });
+ }
+
+ expect(screen.getByTestId("conversation-chat-panel")).toHaveStyle({
+ width: "50%",
+ });
+ expect(
+ screen.queryByTestId("automation-setup-docked-composer"),
+ ).not.toBeInTheDocument();
+ },
+ );
});
diff --git a/__tests__/components/features/home/home-chat-launcher.test.tsx b/__tests__/components/features/home/home-chat-launcher.test.tsx
index a0700f8b61..9e94795f16 100644
--- a/__tests__/components/features/home/home-chat-launcher.test.tsx
+++ b/__tests__/components/features/home/home-chat-launcher.test.tsx
@@ -22,6 +22,7 @@ const enqueueHomeTaskPendingMessage = vi.fn();
const mockDisplayErrorToast = vi.fn();
const mockUseLlmConfigured = vi.fn();
const mockUseConversationWorkspace = vi.fn();
+const mockMarkAutomationSetupHandoff = vi.fn();
let mockImages: File[] = [];
let mockFiles: File[] = [];
@@ -37,6 +38,11 @@ vi.mock("#/utils/enqueue-home-task-pending-message", () => ({
enqueueHomeTaskPendingMessage(...args),
}));
+vi.mock("#/api/automation-setup-handoff-store", () => ({
+ markAutomationSetupHandoff: (...args: unknown[]) =>
+ mockMarkAutomationSetupHandoff(...args),
+}));
+
vi.mock("#/stores/conversation-store", () => ({
useConversationStore: () => ({
images: mockImages,
@@ -386,8 +392,8 @@ describe("HomeChatLauncher", () => {
"SUGGESTIONS$WHAT_TO_BUILD",
);
expect(
- screen.queryByTestId("recommended-automations-rail"),
- ).not.toBeInTheDocument();
+ screen.getByTestId("recommended-automations-rail"),
+ ).toBeInTheDocument();
await user.click(screen.getByTestId("home-launcher-mode-automate"));
@@ -421,10 +427,14 @@ describe("HomeChatLauncher", () => {
await user.click(screen.getByTestId("stub-chat-submit"));
await waitFor(() => expect(createSpy).toHaveBeenCalledTimes(1));
- expect(createSpy).toHaveBeenCalledWith({
- initialUserMsg: "hello world",
- metadata: null,
- });
+ expect(mockMarkAutomationSetupHandoff).not.toHaveBeenCalled();
+
+ expect(createSpy).toHaveBeenCalledWith(
+ expect.objectContaining({
+ initialUserMsg: "hello world",
+ metadata: null,
+ }),
+ );
await waitFor(() =>
expect(mockNavigate).toHaveBeenCalledWith("/conversations/conv-abc"),
);
@@ -463,12 +473,14 @@ describe("HomeChatLauncher", () => {
await user.click(screen.getByTestId("stub-chat-submit"));
await waitFor(() => expect(createSpy).toHaveBeenCalledTimes(1));
- expect(createSpy).toHaveBeenCalledWith({
- initialUserMsg: "hello world",
- metadata: null,
- workingDirOverride: "/p/app",
- workspaceMode: "local_repo",
- });
+ expect(createSpy).toHaveBeenCalledWith(
+ expect.objectContaining({
+ initialUserMsg: "hello world",
+ metadata: null,
+ workingDirOverride: "/p/app",
+ workspaceMode: "local_repo",
+ }),
+ );
await waitFor(() =>
expect(mockNavigate).toHaveBeenCalledWith("/conversations/conv-ws"),
);
@@ -535,12 +547,14 @@ describe("HomeChatLauncher", () => {
await user.click(screen.getByTestId("stub-chat-submit"));
await waitFor(() => expect(createSpy).toHaveBeenCalledTimes(1));
- expect(createSpy).toHaveBeenCalledWith({
- initialUserMsg: "hello world",
- metadata: null,
- workingDirOverride: "/p/app",
- workspaceMode: "new_worktree",
- });
+ expect(createSpy).toHaveBeenCalledWith(
+ expect.objectContaining({
+ initialUserMsg: "hello world",
+ metadata: null,
+ workingDirOverride: "/p/app",
+ workspaceMode: "new_worktree",
+ }),
+ );
await waitFor(() =>
expect(mockNavigate).toHaveBeenCalledWith("/conversations/conv-wt"),
);
@@ -615,14 +629,16 @@ describe("HomeChatLauncher", () => {
await user.click(screen.getByTestId("stub-chat-submit"));
await waitFor(() => expect(createSpy).toHaveBeenCalledTimes(1));
- expect(createSpy).toHaveBeenCalledWith({
- initialUserMsg: "hello world",
- metadata: {
- selected_repository: "org/repo",
- selected_branch: "main",
- git_provider: "github",
- },
- });
+ expect(createSpy).toHaveBeenCalledWith(
+ expect.objectContaining({
+ initialUserMsg: "hello world",
+ metadata: {
+ selected_repository: "org/repo",
+ selected_branch: "main",
+ git_provider: "github",
+ },
+ }),
+ );
await waitFor(() =>
expect(mockNavigate).toHaveBeenCalledWith("/conversations/conv-repo"),
);
@@ -639,9 +655,11 @@ describe("HomeChatLauncher", () => {
await user.click(screen.getByTestId("stub-chat-submit"));
await waitFor(() => expect(createSpy).toHaveBeenCalledTimes(1));
- expect(createSpy).toHaveBeenCalledWith({
- metadata: null,
- });
+ expect(createSpy).toHaveBeenCalledWith(
+ expect.objectContaining({
+ metadata: null,
+ }),
+ );
await waitFor(() =>
expect(sendMessageWithAttachments).toHaveBeenCalledTimes(1),
);
@@ -739,9 +757,11 @@ describe("HomeChatLauncher", () => {
await user.click(screen.getByTestId("stub-chat-submit"));
await waitFor(() => expect(createSpy).toHaveBeenCalledTimes(1));
- expect(createSpy).toHaveBeenCalledWith({
- metadata: null,
- });
+ expect(createSpy).toHaveBeenCalledWith(
+ expect.objectContaining({
+ metadata: null,
+ }),
+ );
expect(sendMessageWithAttachments).not.toHaveBeenCalled();
await waitFor(() =>
expect(enqueueHomeTaskPendingMessage).toHaveBeenCalledWith({
@@ -758,25 +778,53 @@ describe("HomeChatLauncher", () => {
);
});
- it("attaches the picked plugins to the created conversation", async () => {
- const createSpy = vi
- .spyOn(AgentServerConversationService, "createConversation")
- .mockResolvedValue(makeConversationResponse());
-
- renderLauncher();
- const user = userEvent.setup();
-
- await user.click(screen.getByTestId("open-plugin-picker"));
- await user.click(await screen.findByTestId("stub-plugin-pick"));
- await user.click(screen.getByTestId("stub-chat-submit"));
-
- await waitFor(() => expect(createSpy).toHaveBeenCalledTimes(1));
- expect(createSpy).toHaveBeenCalledWith({
- initialUserMsg: "hello world",
- plugins: [{ source: "github:o/a", ref: null, repo_path: null }],
- metadata: null,
- });
- });
+ it.each([
+ {
+ name: "code mode with picked plugins",
+ prepare: async () => {
+ await userEvent.click(screen.getByTestId("open-plugin-picker"));
+ await userEvent.click(await screen.findByTestId("stub-plugin-pick"));
+ },
+ expectedPlugins: [{ source: "github:o/a", ref: null, repo_path: null }],
+ marksAutomationSetup: false,
+ },
+ {
+ name: "automate mode",
+ prepare: async () => {
+ await userEvent.click(
+ screen.getByTestId("home-launcher-mode-automate"),
+ );
+ },
+ expectedPlugins: undefined,
+ marksAutomationSetup: true,
+ },
+ ])(
+ "creates a conversation in $name",
+ async ({ prepare, expectedPlugins, marksAutomationSetup }) => {
+ const createSpy = vi
+ .spyOn(AgentServerConversationService, "createConversation")
+ .mockResolvedValue(makeConversationResponse());
+
+ renderLauncher();
+
+ await prepare();
+ await userEvent.click(screen.getByTestId("stub-chat-submit"));
+
+ await waitFor(() => expect(createSpy).toHaveBeenCalledTimes(1));
+ expect(createSpy).toHaveBeenCalledWith(
+ expect.objectContaining({
+ initialUserMsg: "hello world",
+ plugins: expectedPlugins,
+ metadata: null,
+ }),
+ );
+ if (marksAutomationSetup) {
+ expect(mockMarkAutomationSetupHandoff).toHaveBeenCalledWith("conv-abc");
+ } else {
+ expect(mockMarkAutomationSetupHandoff).not.toHaveBeenCalled();
+ }
+ },
+ );
it("renders the recommended automations rail above pinned activity in Automate mode", async () => {
renderLauncher();
diff --git a/__tests__/hooks/query/use-git-repositories.test.ts b/__tests__/hooks/query/use-git-repositories.test.ts
index 65a7458dc4..caac281c1f 100644
--- a/__tests__/hooks/query/use-git-repositories.test.ts
+++ b/__tests__/hooks/query/use-git-repositories.test.ts
@@ -282,6 +282,17 @@ describe("useGitRepositories", () => {
expect(config().enabled).toBe(false);
});
+ it("can query local repositories before provider settings report a token", () => {
+ setupMocks();
+ mocks.providers = [];
+
+ renderHook(() =>
+ useGitRepositories({ provider: "github", allowMissingProvider: true }),
+ );
+
+ expect(config().enabled).toBe(true);
+ });
+
it("loads more only when another page exists and no request is active", () => {
setupMocks();
mocks.providers = ["github"];
diff --git a/scripts/check-translation-completeness.cjs b/scripts/check-translation-completeness.cjs
index d13df111e6..ad5b832153 100755
--- a/scripts/check-translation-completeness.cjs
+++ b/scripts/check-translation-completeness.cjs
@@ -18,6 +18,9 @@ const IDENTICAL_VALUE_ALLOWLIST = new Set([
'API$TVLY_KEY_EXAMPLE',
'AUTOMATIONS$DOWNLOAD_TARBALL',
'AUTOMATIONS$GIT_SYNC$BRANCH_PLACEHOLDER',
+ 'AUTOMATION_SETUP$MODEL_PLACEHOLDER',
+ 'AUTOMATION_SETUP$PLUGIN_REF_PLACEHOLDER',
+ 'AUTOMATION_SETUP$PLUGIN_SOURCE_PLACEHOLDER',
'AUTOMATIONS$GIT_SYNC$PATH_PLACEHOLDER',
'AUTOMATIONS$GIT_SYNC$REPO_URL_PLACEHOLDER',
'BACKEND$CLOUD_TITLE',
diff --git a/src/api/automation-service/automation-service.api.ts b/src/api/automation-service/automation-service.api.ts
index 01ee4229c8..636ab08ee6 100644
--- a/src/api/automation-service/automation-service.api.ts
+++ b/src/api/automation-service/automation-service.api.ts
@@ -52,6 +52,26 @@ import {
const AUTOMATION_BASE_PATH = "/api/automation";
+type AutomationDraftCreateTarget = SetupEntry | "prompt" | "plugin" | "custom";
+
+function automationCreateEndpointForTarget(
+ target?: AutomationDraftCreateTarget,
+ selectedAction?: string | null,
+): string {
+ if (target === "plugin") return getAutomationEndpoint("createPlugin");
+ if (target === "custom") {
+ const endpoint = getAutomationEndpoint("createBundle");
+ if (!endpoint) {
+ throw new Error(
+ "This deployment does not support creating custom automation bundles.",
+ );
+ }
+ return endpoint;
+ }
+ if (!target || target === "prompt") return automationCreateEndpoint();
+ return automationCreateEndpoint(target, selectedAction);
+}
+
export interface AutomationHealthResponse {
status: "ok" | "error";
message?: string;
@@ -623,13 +643,13 @@ class AutomationService {
*/
static async createAutomationDraft(
body: SetupRequestBody,
- /** The entry and selected action decide the create endpoint. */
- entry?: SetupEntry,
+ /** The entry/action or generic draft kind decides the create endpoint. */
+ target?: AutomationDraftCreateTarget,
selectedAction?: string | null,
): Promise<Record<string, unknown>> {
const active = getActiveBackend().backend;
- const path = `${AUTOMATION_BASE_PATH}${automationCreateEndpoint(
- entry,
+ const path = `${AUTOMATION_BASE_PATH}${automationCreateEndpointForTarget(
+ target,
selectedAction,
)}`;
diff --git a/src/api/automation-setup-handoff-store.ts b/src/api/automation-setup-handoff-store.ts
new file mode 100644
index 0000000000..d45a927d76
--- /dev/null
+++ b/src/api/automation-setup-handoff-store.ts
@@ -0,0 +1,53 @@
+const AUTOMATION_SETUP_HANDOFFS_STORAGE_KEY =
+ "openhands-automation-setup-handoffs";
+
+function readHandoffs(): Record<string, true> {
+ if (typeof window === "undefined") return {};
+
+ try {
+ const raw = window.sessionStorage.getItem(
+ AUTOMATION_SETUP_HANDOFFS_STORAGE_KEY,
+ );
+ if (!raw) return {};
+ const parsed = JSON.parse(raw);
+ if (
+ typeof parsed !== "object" ||
+ parsed === null ||
+ Array.isArray(parsed)
+ ) {
+ return {};
+ }
+ return Object.fromEntries(
+ Object.entries(parsed).filter(([, value]) => value === true),
+ ) as Record<string, true>;
+ } catch {
+ return {};
+ }
+}
+
+function writeHandoffs(handoffs: Record<string, true>) {
+ if (typeof window === "undefined") return;
+
+ try {
+ window.sessionStorage.setItem(
+ AUTOMATION_SETUP_HANDOFFS_STORAGE_KEY,
+ JSON.stringify(handoffs),
+ );
+ } catch {
+ // sessionStorage not available
+ }
+}
+
+export function markAutomationSetupHandoff(conversationId: string) {
+ writeHandoffs({
+ ...readHandoffs(),
+ [conversationId]: true,
+ });
+}
+
+export function consumeAutomationSetupHandoff(
+ conversationId: string | null | undefined,
+): boolean {
+ if (!conversationId) return false;
+ return readHandoffs()[conversationId] === true;
+}
diff --git a/src/api/automation-setup-types.ts b/src/api/automation-setup-types.ts
new file mode 100644
index 0000000000..8bc9b88b26
--- /dev/null
+++ b/src/api/automation-setup-types.ts
@@ -0,0 +1,7 @@
+export type AutomationSetupKind = "prompt" | "plugin" | "custom";
+
+export interface AutomationSetupDraft {
+ prompt: string;
+ kind: AutomationSetupKind;
+ plugins?: string[];
+}
diff --git a/src/api/git-service/git-service.api.ts b/src/api/git-service/git-service.api.ts
index f6363e1049..e89a1e140a 100644
--- a/src/api/git-service/git-service.api.ts
+++ b/src/api/git-service/git-service.api.ts
@@ -1,3 +1,4 @@
+import { GitClient } from "@openhands/typescript-client/clients";
import { RemoteWorkspace } from "@openhands/typescript-client/workspace/remote-workspace";
import { RepositoryPage, BranchPage, InstallationPage } from "#/types/git";
import { Provider } from "#/types/settings";
@@ -31,6 +32,31 @@ const EMPTY_INSTALLATION_PAGE: InstallationPage = {
next_page_id: null,
};
+function normalizeRepositoryPage(page: RepositoryPage): RepositoryPage {
+ return {
+ items: page.items.map((repo) => ({
+ ...repo,
+ git_provider: safeProvider(repo.git_provider),
+ })),
+ next_page_id: page.next_page_id ?? null,
+ ...(page.missing_token !== undefined
+ ? { missing_token: page.missing_token }
+ : {}),
+ };
+}
+
+async function searchAgentServerRepositories(args: {
+ provider: string;
+ query?: string;
+ limit?: number;
+ pageId?: string;
+}): Promise<RepositoryPage> {
+ const page = await new GitClient(
+ getAgentServerClientOptions(),
+ ).searchRepositories(args);
+ return normalizeRepositoryPage(page as RepositoryPage);
+}
+
class GitService {
static async searchGitRepositories(
query: string,
@@ -39,9 +65,17 @@ class GitService {
pageId?: string,
installationId?: string,
): Promise<RepositoryPage> {
- if (isInvalidProvider(provider) || !isCloudActive()) {
+ if (isInvalidProvider(provider)) {
return EMPTY_REPOSITORY_PAGE;
}
+ if (!isCloudActive()) {
+ return searchAgentServerRepositories({
+ provider,
+ query: query || undefined,
+ limit,
+ pageId,
+ });
+ }
return searchCloudRepositories({
provider: safeProvider(provider),
query: query || undefined,
@@ -57,9 +91,16 @@ class GitService {
limit = 30,
installationId?: string,
): Promise<RepositoryPage> {
- if (isInvalidProvider(provider) || !isCloudActive()) {
+ if (isInvalidProvider(provider)) {
return EMPTY_REPOSITORY_PAGE;
}
+ if (!isCloudActive()) {
+ return searchAgentServerRepositories({
+ provider,
+ limit,
+ pageId,
+ });
+ }
return searchCloudRepositories({
provider: safeProvider(provider),
limit,
diff --git a/src/components/features/automations/setup/automation-setup-agent-request.ts b/src/components/features/automations/setup/automation-setup-agent-request.ts
new file mode 100644
index 0000000000..f276b5da40
--- /dev/null
+++ b/src/components/features/automations/setup/automation-setup-agent-request.ts
@@ -0,0 +1,7 @@
+/** Asks the conversation shell to reveal the automation setup agent panel. */
+export const AUTOMATION_SETUP_SHOW_AGENT_EVENT =
+ "openhands:automation-setup-show-agent";
+
+export function requestAutomationSetupAgent() {
+ window.dispatchEvent(new CustomEvent(AUTOMATION_SETUP_SHOW_AGENT_EVENT));
+}
diff --git a/src/components/features/automations/setup/automation-setup-panel.tsx b/src/components/features/automations/setup/automation-setup-panel.tsx
new file mode 100644
index 0000000000..11a762f6be
--- /dev/null
+++ b/src/components/features/automations/setup/automation-setup-panel.tsx
@@ -0,0 +1,955 @@
+import { useState, type ReactNode } from "react";
+import { createPortal } from "react-dom";
+import toast from "react-hot-toast";
+import { useTranslation } from "react-i18next";
+import {
+ CalendarDays,
+ Code2,
+ FileText,
+ Globe2,
+ Plus,
+ X,
+ Zap,
+} from "lucide-react";
+import AutomationService from "#/api/automation-service/automation-service.api";
+import type {
+ AutomationSetupDraft,
+ AutomationSetupKind,
+} from "#/api/automation-setup-types";
+import {
+ automationDetailPath,
+ getAutomationEndpoint,
+} from "#/manifests/automation-interface";
+import { packTarGzip } from "#/utils/tar-gzip";
+import { I18nKey } from "#/i18n/declaration";
+import { BrandButton } from "#/components/features/settings/brand-button";
+import { AutomationSetupPromptStack } from "#/components/features/automations/setup/automation-setup-prompt-stack";
+import {
+ formControlFieldClassName,
+ formControlMultilineFieldClassName,
+ formControlTransitionClassName,
+} from "#/utils/form-control-classes";
+import { cn } from "#/utils/utils";
+import { displayErrorToast } from "#/utils/custom-toast-handlers";
+import { useNavigation } from "#/context/navigation-context";
+import type {
+ InterfaceEndpointName,
+ SetupRequestBody,
+} from "#/manifests/types";
+
+const DEFAULT_TIMEZONE = "America/New_York";
+const DEFAULT_TIME = "09:00";
+const DEFAULT_CUSTOM_SCHEDULE = "0 9 * * *";
+const DEFAULT_EVENT_SOURCE = "github";
+const DEFAULT_EVENT_KEY = "issue_comment.created";
+const DEFAULT_CUSTOM_ENTRYPOINT = "python3 main.py";
+const addOptionButtonClassName = cn(
+ "inline-flex w-fit shrink-0 cursor-pointer items-center rounded-lg border border-[var(--oh-border)] bg-tertiary px-3 py-1.5 text-sm text-content hover:bg-interactive-hover",
+ formControlTransitionClassName,
+);
+
+const MAIN_PY_FILENAME = "main.py";
+const DEFAULT_CUSTOM_SETUP_SCRIPT_PATH = "setup.sh";
+const DEFAULT_CUSTOM_SETUP_SCRIPT = `#!/usr/bin/env bash
+:
+`;
+const DEFAULT_TIMEOUT_SECONDS = "600";
+const PREFLIGHT_TARBALL_PATH =
+ "oh-internal://uploads/00000000-0000-0000-0000-000000000000";
+
+const FREQUENCIES = [
+ "hourly",
+ "daily",
+ "weekdays",
+ "weekly",
+ "custom",
+] as const;
+
+export function parseAutomationSetupRepositories(value: string): string[] {
+ const seen = new Set<string>();
+ return value
+ .split(/[\n,]+/)
+ .map((entry) => entry.trim())
+ .filter((entry) => {
+ if (!entry || seen.has(entry)) return false;
+ seen.add(entry);
+ return true;
+ });
+}
+
+function buildRepositorySource(url: string): {
+ url: string;
+ provider?: "github";
+} {
+ const isExplicitProviderUrl =
+ /^[a-z][a-z\d+.-]*:\/\//i.test(url) || url.startsWith("git@");
+ return isExplicitProviderUrl ? { url } : { url, provider: "github" };
+}
+
+type Frequency = (typeof FREQUENCIES)[number];
+type TriggerKind = "cron" | "event";
+type StatusMessage = { kind: "success" | "error"; text: string } | null;
+
+interface AutomationSetupPanelProps {
+ draft: AutomationSetupDraft;
+ toolbarPortal?: HTMLElement | null;
+ showInlineHeader?: boolean;
+ reserveComposerSpace?: boolean;
+}
+
+function titleCase(value: string): string {
+ return value
+ .split(/\s+/)
+ .filter(Boolean)
+ .slice(0, 4)
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
+ .join(" ");
+}
+
+function deriveName(prompt: string): string {
+ const withoutLead = prompt
+ .replace(/^create\s+(an?\s+)?automation\s+(that|to)?\s*/i, "")
+ .replace(/[.!?].*$/, "")
+ .trim();
+ const name = titleCase(withoutLead || prompt);
+ return name || "New Automation";
+}
+
+function toCron(
+ time: string,
+ frequency: Frequency,
+ customSchedule: string,
+): string {
+ if (frequency === "custom") return customSchedule || DEFAULT_CUSTOM_SCHEDULE;
+ if (frequency === "hourly") return "0 * * * *";
+
+ const [hour = "9", minute = "0"] = time.split(":");
+ const cronTime = `${Number(minute)} ${Number(hour)}`;
+ if (frequency === "weekdays") return `${cronTime} * * 1-5`;
+ if (frequency === "weekly") return `${cronTime} * * 1`;
+ return `${cronTime} * * *`;
+}
+
+function buildStarterPython(prompt: string): string {
+ return `import json\nimport os\nimport urllib.request\n\n\ndef fire_callback(status="COMPLETED", error=None):\n url = os.environ.get("AUTOMATION_CALLBACK_URL", "")\n if not url:\n return\n body = {"status": status, "run_id": os.environ.get("AUTOMATION_RUN_ID", "")}\n if error:\n body["error"] = error\n request = urllib.request.Request(\n url,\n data=json.dumps(body).encode(),\n headers={\n "Content-Type": "application/json",\n "Authorization": f"Bearer {os.environ.get('AUTOMATION_CALLBACK_API_KEY', '')}",\n },\n )\n urllib.request.urlopen(request, timeout=10)\n\n\ndef main():\n prompt = ${JSON.stringify(prompt)}\n print(f"Automation prompt: {prompt}")\n\n\nif __name__ == "__main__":\n try:\n main()\n fire_callback("COMPLETED")\n except Exception as exc:\n fire_callback("FAILED", str(exc))\n raise\n`;
+}
+
+function endpointName(kind: AutomationSetupKind): InterfaceEndpointName {
+ if (kind === "plugin") return "createPlugin";
+ if (kind === "custom") return "createBundle";
+ return "createPrompt";
+}
+
+function frequencyLabelKey(frequency: Frequency): I18nKey {
+ switch (frequency) {
+ case "hourly":
+ return I18nKey.AUTOMATION_SETUP$FREQUENCY_HOURLY;
+ case "daily":
+ return I18nKey.AUTOMATIONS$FREQUENCY_DAILY;
+ case "weekdays":
+ return I18nKey.AUTOMATION_SETUP$FREQUENCY_WEEKDAYS;
+ case "weekly":
+ return I18nKey.AUTOMATION_SETUP$FREQUENCY_WEEKLY;
+ case "custom":
+ return I18nKey.AUTOMATION_SETUP$TYPE_CUSTOM;
+ }
+}
+
+export function AutomationSetupPanel({
+ draft,
+ toolbarPortal,
+ showInlineHeader = true,
+ reserveComposerSpace = false,
+}: AutomationSetupPanelProps) {
+ const [model, setModel] = useState("");
+ const [agentProfileId, setAgentProfileId] = useState("");
+ const { t } = useTranslation("openhands");
+ const { navigate } = useNavigation();
+ const [kind, setKind] = useState<AutomationSetupKind>(draft.kind);
+ const [name, setName] = useState(() => deriveName(draft.prompt));
+ const [prompt, setPrompt] = useState(draft.prompt);
+ const [repository, setRepository] = useState("");
+ const [pluginSource, setPluginSource] = useState(draft.plugins?.[0] ?? "");
+ const [pluginRef, setPluginRef] = useState("");
+ const [customCode, setCustomCode] = useState(() =>
+ buildStarterPython(draft.prompt),
+ );
+ const [entrypoint, setEntrypoint] = useState(DEFAULT_CUSTOM_ENTRYPOINT);
+ const [setupScriptPath, setSetupScriptPath] = useState(
+ DEFAULT_CUSTOM_SETUP_SCRIPT_PATH,
+ );
+ const [setupScript, setSetupScript] = useState(DEFAULT_CUSTOM_SETUP_SCRIPT);
+ const [triggerKind, setTriggerKind] = useState<TriggerKind>("cron");
+ const [frequency, setFrequency] = useState<Frequency>("daily");
+ const [time, setTime] = useState(DEFAULT_TIME);
+ const [timezone, setTimezone] = useState(DEFAULT_TIMEZONE);
+ const [customSchedule, setCustomSchedule] = useState(DEFAULT_CUSTOM_SCHEDULE);
+ const [eventSource, setEventSource] = useState(DEFAULT_EVENT_SOURCE);
+ const [eventKey, setEventKey] = useState(DEFAULT_EVENT_KEY);
+ const [eventFilter, setEventFilter] = useState("");
+ const [showTimeout, setShowTimeout] = useState(false);
+ const [timeoutSeconds, setTimeoutSeconds] = useState(DEFAULT_TIMEOUT_SECONDS);
+ const [statusMessage, setStatusMessage] = useState<StatusMessage>(null);
+ const [isSubmitting, setIsSubmitting] = useState(false);
+
+ const normalizedName = () => name.trim() || deriveName(prompt);
+ const buildTrigger = () =>
+ triggerKind === "event"
+ ? {
+ type: "event",
+ source: eventSource.trim() || DEFAULT_EVENT_SOURCE,
+ on: eventKey.trim() || DEFAULT_EVENT_KEY,
+ ...(eventFilter.trim() ? { filter: eventFilter.trim() } : {}),
+ }
+ : {
+ type: "cron",
+ schedule: toCron(time, frequency, customSchedule.trim()),
+ timezone: timezone.trim() || DEFAULT_TIMEZONE,
+ };
+ const buildPresetBody = (): SetupRequestBody => {
+ const body: SetupRequestBody = {
+ name: normalizedName(),
+ prompt: prompt.trim(),
+ trigger: buildTrigger(),
+ enabled: false,
+ } as SetupRequestBody;
+ if (agentProfileId.trim()) {
+ body.agent_profile_id = agentProfileId.trim();
+ } else if (model.trim()) {
+ body.model = model.trim();
+ }
+ const repositories = parseAutomationSetupRepositories(repository);
+ if (repositories.length > 0) {
+ body.repos = repositories.map(buildRepositorySource);
+ }
+ if (showTimeout && timeoutSeconds.trim())
+ body.timeout = Number(timeoutSeconds);
+ if (kind === "plugin") {
+ body.plugins = [
+ {
+ source: pluginSource.trim(),
+ ...(pluginRef.trim() ? { ref: pluginRef.trim() } : {}),
+ },
+ ];
+ }
+ return body;
+ };
+ const buildCustomBody = (tarballPath: string): SetupRequestBody =>
+ ({
+ name: normalizedName(),
+ trigger: buildTrigger(),
+ tarball_path: tarballPath,
+ entrypoint: entrypoint.trim(),
+ enabled: false,
+ setup_script_path: setupScriptPath.trim(),
+ ...(showTimeout && timeoutSeconds.trim()
+ ? { timeout: Number(timeoutSeconds) }
+ : {}),
+ }) as SetupRequestBody;
+ const validateRequiredFields = (): boolean => {
+ if (!prompt.trim() && kind !== "custom") {
+ setStatusMessage({
+ kind: "error",
+ text: t(I18nKey.AUTOMATION_SETUP$PROMPT_REQUIRED),
+ });
+ return false;
+ }
+ if (kind === "plugin" && !pluginSource.trim()) {
+ setStatusMessage({
+ kind: "error",
+ text: t(I18nKey.AUTOMATION_SETUP$PLUGIN_REQUIRED),
+ });
+ return false;
+ }
+ if (kind === "custom" && !customCode.trim()) {
+ setStatusMessage({
+ kind: "error",
+ text: t(I18nKey.AUTOMATION_SETUP$CODE_REQUIRED),
+ });
+ return false;
+ }
+ if (kind === "custom" && !entrypoint.trim()) {
+ setStatusMessage({
+ kind: "error",
+ text: t(I18nKey.AUTOMATION_SETUP$ENTRYPOINT_REQUIRED),
+ });
+ return false;
+ }
+ if (kind === "custom" && !setupScriptPath.trim()) {
+ setStatusMessage({
+ kind: "error",
+ text: t(I18nKey.AUTOMATION_SETUP$SETUP_SCRIPT_PATH_REQUIRED),
+ });
+ return false;
+ }
+ if (kind === "custom" && !setupScript.trim()) {
+ setStatusMessage({
+ kind: "error",
+ text: t(I18nKey.AUTOMATION_SETUP$SETUP_SCRIPT_REQUIRED),
+ });
+ return false;
+ }
+ return true;
+ };
+ const handleSaveDraft = () => {
+ setStatusMessage({
+ kind: "success",
+ text: t(I18nKey.AUTOMATION_SETUP$DRAFT_SAVED),
+ });
+ };
+ const handleTest = async () => {
+ if (!validateRequiredFields()) return;
+ setIsSubmitting(true);
+ try {
+ const result = await AutomationService.validateDraft({
+ endpoint: getAutomationEndpoint(endpointName(kind)),
+ draft:
+ kind === "custom"
+ ? buildCustomBody(PREFLIGHT_TARBALL_PATH)
+ : buildPresetBody(),
+ });
+ setStatusMessage({
+ kind: result.valid ? "success" : "error",
+ text: result.valid
+ ? t(I18nKey.AUTOMATION_SETUP$TEST_PASSED)
+ : result.errors[0]?.message || t(I18nKey.SETUP$SUBMIT_FAILED),
+ });
+ } catch (error) {
+ displayErrorToast(error instanceof Error ? error.message : null);
+ } finally {
+ setIsSubmitting(false);
+ }
+ };
+ const handleCreate = async () => {
+ if (!validateRequiredFields()) return;
+ setIsSubmitting(true);
+ try {
+ let created: Record<string, unknown>;
+ if (kind === "custom") {
+ const archive = await packTarGzip([
+ { name: MAIN_PY_FILENAME, content: customCode, mode: 0o644 },
+ {
+ name: setupScriptPath.trim(),
+ content: setupScript,
+ mode: 0o755,
+ },
+ ]);
+ const tarballPath = await AutomationService.uploadAutomationTarball(
+ normalizedName(),
+ archive,
+ );
+ created = await AutomationService.createAutomationDraft(
+ buildCustomBody(tarballPath),
+ kind,
+ );
+ } else {
+ created = await AutomationService.createAutomationDraft(
+ buildPresetBody(),
+ kind,
+ );
+ }
+ toast.success(t(I18nKey.AUTOMATION_SETUP$CREATED));
+ if (typeof created.id === "string")
+ navigate(automationDetailPath(created.id));
+ } catch (error) {
+ displayErrorToast(error instanceof Error ? error.message : null);
+ } finally {
+ setIsSubmitting(false);
+ }
+ };
+
+ const compactToolbarButtonClassName = "!h-7 !min-h-7 !px-2.5 !text-xs";
+
+ const renderToolbarActions = () => (
+ <div className="flex shrink-0 items-center gap-1.5">
+ <BrandButton
+ type="button"
+ variant="secondary"
+ testId="automation-setup-save-draft"
+ className={compactToolbarButtonClassName}
+ isDisabled
+ onClick={handleSaveDraft}
+ >
+ {t(I18nKey.AUTOMATION_SETUP$SAVE_DRAFT)}
+ </BrandButton>
+ <BrandButton
+ type="button"
+ variant="secondary"
+ testId="automation-setup-test"
+ className={compactToolbarButtonClassName}
+ isDisabled={isSubmitting}
+ onClick={handleTest}
+ >
+ {t(I18nKey.AUTOMATION_SETUP$TEST)}
+ </BrandButton>
+ <BrandButton
+ type="button"
+ variant="primary"
+ testId="automation-setup-create"
+ className={compactToolbarButtonClassName}
+ isDisabled={isSubmitting}
+ onClick={handleCreate}
+ >
+ {t(I18nKey.AUTOMATIONS$CREATE_AUTOMATION_BUTTON)}
+ </BrandButton>
+ </div>
+ );
+
+ return (
+ <>
+ {toolbarPortal
+ ? createPortal(renderToolbarActions(), toolbarPortal)
+ : null}
+ <div
+ data-testid="automation-setup-panel"
+ className="flex h-full min-h-0 flex-col bg-base"
+ >
+ {showInlineHeader ? (
+ <header className="flex h-10 min-h-10 shrink-0 items-center justify-between gap-2 border-b border-[var(--oh-border)] bg-base px-3">
+ <div className="flex min-w-0 items-center gap-2">
+ <h2 className="min-w-0 truncate text-sm font-medium text-content">
+ {name.trim() || t(I18nKey.AUTOMATION_SETUP$TITLE)}
+ </h2>
+ </div>
+ {renderToolbarActions()}
+ </header>
+ ) : null}
+
+ <div
+ className={cn(
+ "custom-scrollbar-always min-h-0 flex-1 overflow-y-auto px-5 pt-5 [scrollbar-gutter:stable]",
+ reserveComposerSpace ? "pb-52" : "pb-5",
+ )}
+ >
+ <div className="mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6">
+ <Field label={t(I18nKey.AUTOMATIONS$NAME)}>
+ <input
+ data-testid="automation-setup-name"
+ value={name}
+ placeholder={t(I18nKey.AUTOMATION_SETUP$NAME_PLACEHOLDER)}
+ onChange={(event) => setName(event.target.value)}
+ className={formControlFieldClassName}
+ />
+ </Field>
+
+ <div className="flex flex-col gap-2.5">
+ <div className="flex w-full items-center gap-2">
+ <span className="flex items-center gap-2 text-sm">
+ {kind === "custom"
+ ? t(I18nKey.AUTOMATION_SETUP$CUSTOM_PYTHON)
+ : t(I18nKey.AUTOMATIONS$PROMPT)}
+ </span>
+ <button
+ type="button"
+ data-testid={
+ kind === "custom"
+ ? "automation-setup-kind-prompt"
+ : "automation-setup-kind-custom"
+ }
+ onClick={() =>
+ setKind(kind === "custom" ? "prompt" : "custom")
+ }
+ className={cn(addOptionButtonClassName, "ml-auto gap-1.5")}
+ >
+ {kind === "custom" ? (
+ <FileText className="size-4" aria-hidden />
+ ) : (
+ <Code2 className="size-4" aria-hidden />
+ )}
+ {kind === "custom"
+ ? t(I18nKey.AUTOMATIONS$PROMPT)
+ : t(I18nKey.AUTOMATION_SETUP$TYPE_CUSTOM)}
+ </button>
+ </div>
+ {kind !== "custom" ? (
+ <AutomationSetupPromptStack
+ prompt={prompt}
+ repository={repository}
+ showTitle={false}
+ isStreaming={false}
+ onPromptChange={setPrompt}
+ onRepositoryChange={setRepository}
+ model={model}
+ onModelChange={setModel}
+ agentProfileId={agentProfileId}
+ onAgentProfileChange={setAgentProfileId}
+ />
+ ) : (
+ <CustomCodeFields
+ code={customCode}
+ entrypoint={entrypoint}
+ setupScriptPath={setupScriptPath}
+ setupScript={setupScript}
+ onCodeChange={setCustomCode}
+ onEntrypointChange={setEntrypoint}
+ onSetupScriptPathChange={setSetupScriptPath}
+ onSetupScriptChange={setSetupScript}
+ />
+ )}
+ </div>
+
+ <section className="flex flex-col gap-2.5">
+ <div
+ role="radiogroup"
+ aria-label={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER)}
+ className="grid grid-cols-2 gap-2"
+ >
+ <TriggerCard
+ icon={<CalendarDays className="size-4" aria-hidden />}
+ title={t(I18nKey.AUTOMATION_SETUP$SCHEDULE)}
+ description={t(I18nKey.AUTOMATION_SETUP$SCHEDULE_DESCRIPTION)}
+ selected={triggerKind === "cron"}
+ onClick={() => setTriggerKind("cron")}
+ />
+ <TriggerCard
+ icon={<Zap className="size-4" aria-hidden />}
+ title={t(I18nKey.AUTOMATIONS$DETAIL$TRIGGER_EVENT)}
+ description={t(I18nKey.AUTOMATION_SETUP$EVENT_DESCRIPTION)}
+ selected={triggerKind === "event"}
+ onClick={() => setTriggerKind("event")}
+ />
+ </div>
+ </section>
+
+ {triggerKind === "cron" ? (
+ <ScheduleFields
+ frequency={frequency}
+ time={time}
+ timezone={timezone}
+ customSchedule={customSchedule}
+ setFrequency={setFrequency}
+ setTime={setTime}
+ setTimezone={setTimezone}
+ setCustomSchedule={setCustomSchedule}
+ />
+ ) : (
+ <EventFields
+ eventSource={eventSource}
+ eventKey={eventKey}
+ eventFilter={eventFilter}
+ setEventSource={setEventSource}
+ setEventKey={setEventKey}
+ setEventFilter={setEventFilter}
+ />
+ )}
+
+ <section className="flex flex-col gap-2.5">
+ <span className="text-sm">
+ {t(I18nKey.AUTOMATION_SETUP$ADDITIONAL_OPTIONS)}
+ </span>
+ {kind === "plugin" ? (
+ <div
+ data-testid="automation-setup-plugin-module"
+ className="flex flex-col gap-3 rounded-xl border border-[var(--oh-border)] bg-base-secondary p-4"
+ >
+ <div className="flex min-w-0 items-end gap-2">
+ <div className="grid min-w-0 flex-1 gap-3 md:grid-cols-[2fr_1fr]">
+ <Field label={t(I18nKey.AUTOMATION_SETUP$PLUGIN_SOURCE)}>
+ <input
+ data-testid="automation-setup-plugin-source"
+ value={pluginSource}
+ placeholder={t(
+ I18nKey.AUTOMATION_SETUP$PLUGIN_SOURCE_PLACEHOLDER,
+ )}
+ onChange={(event) =>
+ setPluginSource(event.target.value)
+ }
+ className={formControlFieldClassName}
+ />
+ </Field>
+ <Field label={t(I18nKey.AUTOMATION_SETUP$PLUGIN_REF)}>
+ <input
+ data-testid="automation-setup-plugin-ref"
+ value={pluginRef}
+ placeholder={t(
+ I18nKey.AUTOMATION_SETUP$PLUGIN_REF_PLACEHOLDER,
+ )}
+ onChange={(event) => setPluginRef(event.target.value)}
+ className={formControlFieldClassName}
+ />
+ </Field>
+ </div>
+ <button
+ type="button"
+ data-testid="automation-setup-plugin-remove"
+ aria-label={t(I18nKey.COMMON$REMOVE)}
+ onClick={() => {
+ setPluginSource("");
+ setPluginRef("");
+ setKind("prompt");
+ }}
+ className={cn(
+ "flex size-9 shrink-0 items-center justify-center rounded-lg border border-[var(--oh-border)] text-[var(--oh-muted)] hover:bg-white/5 hover:text-white",
+ formControlTransitionClassName,
+ )}
+ >
+ <X className="size-4" aria-hidden />
+ </button>
+ </div>
+ </div>
+ ) : null}
+ {showTimeout ? (
+ <div className="flex min-w-0 items-end gap-2">
+ <div className="min-w-0 flex-1">
+ <Field label={t(I18nKey.AUTOMATION_SETUP$TIMEOUT_SECONDS)}>
+ <input
+ data-testid="automation-setup-timeout"
+ type="number"
+ min="1"
+ value={timeoutSeconds}
+ onChange={(event) =>
+ setTimeoutSeconds(event.target.value)
+ }
+ className={formControlFieldClassName}
+ />
+ </Field>
+ </div>
+ <button
+ type="button"
+ data-testid="automation-setup-timeout-remove"
+ aria-label={t(I18nKey.COMMON$REMOVE)}
+ onClick={() => setShowTimeout(false)}
+ className={cn(
+ "flex size-9 shrink-0 items-center justify-center rounded-lg border border-[var(--oh-border)] text-[var(--oh-muted)] hover:bg-white/5 hover:text-white",
+ formControlTransitionClassName,
+ )}
+ >
+ <X className="size-4" aria-hidden />
+ </button>
+ </div>
+ ) : null}
+ <div className="flex flex-wrap items-center gap-2">
+ {kind !== "plugin" ? (
+ <button
+ type="button"
+ data-testid="automation-setup-add-plugin"
+ onClick={() => setKind("plugin")}
+ className={cn(addOptionButtonClassName, "gap-1.5")}
+ >
+ <Plus className="size-4" aria-hidden />
+ {`${t(I18nKey.BUTTON$ADD)} ${t(I18nKey.AUTOMATION_SETUP$TYPE_PLUGIN)}`}
+ </button>
+ ) : null}
+ {!showTimeout ? (
+ <button
+ type="button"
+ data-testid="automation-setup-add-timeout"
+ onClick={() => setShowTimeout(true)}
+ className={cn(addOptionButtonClassName, "gap-1.5")}
+ >
+ <Plus className="size-4" aria-hidden />
+ {t(I18nKey.AUTOMATION_SETUP$ADD_TIMEOUT)}
+ </button>
+ ) : null}
+ </div>
+ </section>
+
+ {statusMessage && (
+ <p
+ role="status"
+ data-testid="automation-setup-status"
+ className={cn(
+ "text-sm",
+ statusMessage.kind === "success"
+ ? "text-green-400"
+ : "text-red-400",
+ )}
+ >
+ {statusMessage.text}
+ </p>
+ )}
+ </div>
+ </div>
+ </div>
+ </>
+ );
+}
+
+function CustomCodeFields({
+ code,
+ entrypoint,
+ setupScriptPath,
+ setupScript,
+ onCodeChange,
+ onEntrypointChange,
+ onSetupScriptPathChange,
+ onSetupScriptChange,
+}: {
+ code: string;
+ entrypoint: string;
+ setupScriptPath: string;
+ setupScript: string;
+ onCodeChange: (value: string) => void;
+ onEntrypointChange: (value: string) => void;
+ onSetupScriptPathChange: (value: string) => void;
+ onSetupScriptChange: (value: string) => void;
+}) {
+ const { t } = useTranslation("openhands");
+ return (
+ <div className="flex flex-col gap-4">
+ <div className="grid gap-3 md:grid-cols-[2fr_1fr]">
+ <Field label={t(I18nKey.AUTOMATION_SETUP$ENTRYPOINT)}>
+ <input
+ data-testid="automation-setup-entrypoint"
+ value={entrypoint}
+ onChange={(event) => onEntrypointChange(event.target.value)}
+ className={formControlFieldClassName}
+ />
+ </Field>
+ <Field label={t(I18nKey.AUTOMATION_SETUP$SETUP_SCRIPT_PATH)}>
+ <input
+ data-testid="automation-setup-setup-script-path"
+ value={setupScriptPath}
+ onChange={(event) => onSetupScriptPathChange(event.target.value)}
+ className={formControlFieldClassName}
+ />
+ </Field>
+ </div>
+ <Field label={t(I18nKey.AUTOMATION_SETUP$PYTHON_CODE)}>
+ <textarea
+ data-testid="automation-setup-custom-code"
+ rows={12}
+ value={code}
+ onChange={(event) => onCodeChange(event.target.value)}
+ spellCheck={false}
+ className={cn(
+ formControlMultilineFieldClassName,
+ "font-mono text-xs",
+ )}
+ />
+ </Field>
+ <Field label={t(I18nKey.AUTOMATION_SETUP$SETUP_SCRIPT)}>
+ <textarea
+ data-testid="automation-setup-setup-script"
+ rows={4}
+ value={setupScript}
+ onChange={(event) => onSetupScriptChange(event.target.value)}
+ spellCheck={false}
+ className={cn(
+ formControlMultilineFieldClassName,
+ "font-mono text-xs",
+ )}
+ />
+ </Field>
+ </div>
+ );
+}
+
+function ScheduleFields({
+ frequency,
+ time,
+ timezone,
+ customSchedule,
+ setFrequency,
+ setTime,
+ setTimezone,
+ setCustomSchedule,
+}: {
+ frequency: Frequency;
+ time: string;
+ timezone: string;
+ customSchedule: string;
+ setFrequency: (value: Frequency) => void;
+ setTime: (value: string) => void;
+ setTimezone: (value: string) => void;
+ setCustomSchedule: (value: string) => void;
+}) {
+ const { t } = useTranslation("openhands");
+ return (
+ <section className="flex flex-col gap-2.5">
+ <div className="flex min-w-0 items-center gap-2">
+ <span className="shrink-0 text-sm">
+ {t(I18nKey.AUTOMATION_SETUP$FREQUENCY)}
+ </span>
+ <div
+ role="radiogroup"
+ aria-label={t(I18nKey.AUTOMATION_SETUP$FREQUENCY)}
+ className="inline-flex max-w-full min-w-0 items-center gap-0.5 overflow-x-auto rounded-lg bg-[var(--oh-surface-raised)] p-0.5"
+ >
+ {FREQUENCIES.map((item) => (
+ <button
+ key={item}
+ type="button"
+ role="radio"
+ data-testid={`automation-setup-frequency-${item}`}
+ aria-checked={frequency === item}
+ onClick={() => setFrequency(item)}
+ className={cn(
+ "inline-flex h-8 shrink-0 items-center rounded-md px-3 text-sm",
+ formControlTransitionClassName,
+ frequency === item
+ ? "border border-[var(--oh-interactive-hover)] bg-base-secondary text-content"
+ : "border border-transparent text-[var(--oh-muted)] hover:text-content",
+ )}
+ >
+ {t(frequencyLabelKey(item))}
+ </button>
+ ))}
+ </div>
+ </div>
+ <div className="flex w-full min-w-0 items-center gap-4 overflow-x-auto">
+ {frequency === "custom" ? (
+ <label className="flex shrink-0 items-center gap-2.5">
+ <span className="shrink-0 text-sm text-content">
+ {t(I18nKey.AUTOMATION_SETUP$TYPE_CUSTOM)}
+ </span>
+ <input
+ data-testid="automation-setup-custom-schedule"
+ value={customSchedule}
+ onChange={(event) => setCustomSchedule(event.target.value)}
+ className={cn(formControlFieldClassName, "w-[14rem]")}
+ />
+ </label>
+ ) : (
+ <>
+ <label className="flex shrink-0 items-center gap-2.5">
+ <span className="shrink-0 text-sm text-content">
+ {t(I18nKey.AUTOMATION_SETUP$AT)}
+ </span>
+ <div className="relative">
+ <input
+ data-testid="automation-setup-time"
+ type="time"
+ value={time}
+ onChange={(event) => setTime(event.target.value)}
+ className={cn(formControlFieldClassName, "w-[9.5rem]")}
+ />
+ </div>
+ </label>
+ <div className="relative shrink-0">
+ <select
+ data-testid="automation-setup-timezone"
+ value={timezone}
+ onChange={(event) => setTimezone(event.target.value)}
+ className={cn(formControlFieldClassName, "w-[15rem] pl-9")}
+ >
+ <option value={timezone}>{timezone}</option>
+ {timezone !== DEFAULT_TIMEZONE ? (
+ <option value={DEFAULT_TIMEZONE}>{DEFAULT_TIMEZONE}</option>
+ ) : null}
+ </select>
+ <Globe2
+ className="pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-[var(--oh-muted)]"
+ aria-hidden
+ />
+ </div>
+ </>
+ )}
+ </div>
+ </section>
+ );
+}
+
+function EventFields({
+ eventSource,
+ eventKey,
+ eventFilter,
+ setEventSource,
+ setEventKey,
+ setEventFilter,
+}: {
+ eventSource: string;
+ eventKey: string;
+ eventFilter: string;
+ setEventSource: (value: string) => void;
+ setEventKey: (value: string) => void;
+ setEventFilter: (value: string) => void;
+}) {
+ const { t } = useTranslation("openhands");
+ return (
+ <section className="grid gap-3 md:grid-cols-2">
+ <Field label={t(I18nKey.AUTOMATION_SETUP$EVENT_SOURCE)}>
+ <input
+ data-testid="automation-setup-event-source"
+ value={eventSource}
+ onChange={(event) => setEventSource(event.target.value)}
+ className={formControlFieldClassName}
+ />
+ </Field>
+ <Field label={t(I18nKey.AUTOMATION_SETUP$EVENT_KEY)}>
+ <input
+ data-testid="automation-setup-event-key"
+ value={eventKey}
+ onChange={(event) => setEventKey(event.target.value)}
+ className={formControlFieldClassName}
+ />
+ </Field>
+ <div className="md:col-span-2">
+ <Field
+ label={t(I18nKey.AUTOMATION_SETUP$EVENT_FILTER)}
+ suffix={t(I18nKey.COMMON$OPTIONAL)}
+ >
+ <input
+ data-testid="automation-setup-event-filter"
+ value={eventFilter}
+ onChange={(event) => setEventFilter(event.target.value)}
+ className={formControlFieldClassName}
+ />
+ </Field>
+ </div>
+ </section>
+ );
+}
+
+function Field({
+ label,
+ suffix,
+ horizontal = false,
+ children,
+}: {
+ label: string;
+ suffix?: string;
+ horizontal?: boolean;
+ children: ReactNode;
+}) {
+ return (
+ <label
+ className={cn("flex gap-2", horizontal ? "items-center" : "flex-col")}
+ >
+ <span className="flex items-center gap-2 text-sm font-semibold text-white">
+ {label}
+ {suffix && (
+ <span className="font-normal text-[var(--oh-muted)]">{suffix}</span>
+ )}
+ </span>
+ <div className="min-w-0 flex-1">{children}</div>
+ </label>
+ );
+}
+
+function TriggerCard({
+ icon,
+ title,
+ description,
+ selected,
+ onClick,
+}: {
+ icon: ReactNode;
+ title: string;
+ description: string;
+ selected: boolean;
+ onClick: () => void;
+}) {
+ return (
+ <button
+ type="button"
+ aria-pressed={selected}
+ onClick={onClick}
+ className={cn(
+ "flex items-start gap-3 rounded-xl border p-4 text-left",
+ formControlTransitionClassName,
+ selected
+ ? "border-white/20 bg-white/10 text-white"
+ : "border-[var(--oh-border)] bg-base-secondary text-[var(--oh-muted)] hover:bg-white/5 hover:text-white",
+ )}
+ >
+ <span className="mt-0.5 text-[var(--oh-muted)]">{icon}</span>
+ <span className="flex flex-col gap-1">
+ <span className="text-sm font-semibold">{title}</span>
+ <span className="text-xs leading-5 text-[var(--oh-muted)]">
+ {description}
+ </span>
+ </span>
+ </button>
+ );
+}
diff --git a/src/components/features/automations/setup/automation-setup-prompt-stack.tsx b/src/components/features/automations/setup/automation-setup-prompt-stack.tsx
new file mode 100644
index 0000000000..50b24f288b
--- /dev/null
+++ b/src/components/features/automations/setup/automation-setup-prompt-stack.tsx
@@ -0,0 +1,718 @@
+import { useRef, useState, type ReactNode } from "react";
+import { Info, Plus, X } from "lucide-react";
+import { useTranslation } from "react-i18next";
+import { getActiveBackend } from "#/api/backend-registry/active-store";
+import { BrandButton } from "#/components/features/settings/brand-button";
+import { SettingsInput } from "#/components/features/settings/settings-input";
+import { LoadingSpinner } from "#/components/shared/loading-spinner";
+import { ModalBackdrop } from "#/components/shared/modals/modal-backdrop";
+import { ModalCloseButton } from "#/components/shared/modals/modal-close-button";
+import { ContextMenuListItem } from "#/components/features/context-menu/context-menu-list-item";
+import { StyledTooltip } from "#/components/shared/buttons/styled-tooltip";
+import { useAgentProfiles } from "#/hooks/query/use-agent-profiles";
+import { useGitRepositories } from "#/hooks/query/use-git-repositories";
+import { useLlmProfiles } from "#/hooks/query/use-llm-profiles";
+import { useClickOutsideElement } from "#/hooks/use-click-outside-element";
+import { useUserProviders } from "#/hooks/use-user-providers";
+import { usePromptTextareaResize } from "#/hooks/use-prompt-textarea-resize";
+import { I18nKey } from "#/i18n/declaration";
+import CheckIcon from "#/icons/checkmark.svg?react";
+import SearchIcon from "#/icons/search.svg?react";
+import { ComboboxCaretInline } from "#/ui/combobox-caret";
+import { Divider } from "#/ui/divider";
+import { ContextMenu } from "#/ui/context-menu";
+import { extensionModuleCardPillClassName } from "#/utils/extension-module-card-classes";
+import { chatInputPillButtonClassName } from "#/utils/form-control-classes";
+import { modalTitleLgClassName } from "#/utils/modal-classes";
+import { cn } from "#/utils/utils";
+import { formatModelNameForDisplay } from "#/utils/format-model-name";
+import type { Provider } from "#/types/settings";
+
+const PROFILE_LABEL_MAX_CHARS = 18;
+
+function truncateLabel(label: string): string {
+ return label.length <= PROFILE_LABEL_MAX_CHARS
+ ? label
+ : `${label.slice(0, PROFILE_LABEL_MAX_CHARS)}…`;
+}
+
+function parseRepositories(value: string): string[] {
+ const seen = new Set<string>();
+ return value
+ .split(/[\n,]+/)
+ .map((entry) => entry.trim())
+ .filter((entry) => {
+ if (!entry || seen.has(entry)) return false;
+ seen.add(entry);
+ return true;
+ });
+}
+
+function SetupModelPill({
+ value,
+ onChange,
+}: {
+ value: string;
+ onChange: (profileName: string) => void;
+}) {
+ const { t } = useTranslation("openhands");
+ const { data, isLoading } = useLlmProfiles();
+ const profiles = data?.profiles ?? [];
+ const activeProfileName = data?.active_profile ?? null;
+ const [isOpen, setIsOpen] = useState(false);
+ const triggerRef = useRef<HTMLButtonElement>(null);
+ const popoverRef = useClickOutsideElement<HTMLUListElement>(
+ () => setIsOpen(false),
+ triggerRef,
+ );
+ const pinnedProfileName = value.trim() || null;
+ const displayName = pinnedProfileName ?? activeProfileName;
+ const pillLabel =
+ displayName ?? t(I18nKey.AUTOMATION_SETUP$MODEL_PLACEHOLDER);
+ const canOpen = !isLoading && profiles.length > 0;
+ const tooltip = t(I18nKey.LLM$MODEL);
+
+ return (
+ <div className="relative min-w-0">
+ <StyledTooltip content={tooltip} placement="top">
+ <button
+ ref={triggerRef}
+ type="button"
+ className={cn(
+ chatInputPillButtonClassName,
+ "max-w-[200px] rounded-lg",
+ )}
+ data-testid="automation-setup-model"
+ aria-label={displayName ?? pillLabel}
+ aria-expanded={isOpen}
+ aria-haspopup="dialog"
+ onMouseDown={(event) => event.preventDefault()}
+ onClick={(event) => {
+ event.preventDefault();
+ event.stopPropagation();
+ if (!canOpen) return;
+ setIsOpen((open) => !open);
+ }}
+ >
+ <span className="truncate">
+ {displayName ? truncateLabel(pillLabel) : pillLabel}
+ </span>
+ <ComboboxCaretInline isOpen={isOpen} />
+ </button>
+ </StyledTooltip>
+ {isOpen && canOpen ? (
+ <ContextMenu
+ ref={popoverRef}
+ testId="automation-setup-model-popover"
+ position="top"
+ alignment="left"
+ spacing="none"
+ className="z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto"
+ >
+ <ContextMenuListItem
+ testId="automation-setup-model-option-active"
+ onClick={(event) => {
+ event.preventDefault();
+ event.stopPropagation();
+ onChange("");
+ setIsOpen(false);
+ }}
+ className={cn(
+ "flex items-center justify-between gap-2",
+ !pinnedProfileName && "bg-[var(--oh-interactive-hover)]",
+ )}
+ >
+ <span className="truncate">{t(I18nKey.COMMON$ACTIVE_PROFILE)}</span>
+ {!pinnedProfileName ? (
+ <CheckIcon className="size-4 shrink-0" aria-hidden />
+ ) : null}
+ </ContextMenuListItem>
+ {profiles.map((item) => {
+ const isSelected = item.name === pinnedProfileName;
+ const displayModel = formatModelNameForDisplay(item.model);
+ return (
+ <ContextMenuListItem
+ key={item.name}
+ testId={`automation-setup-model-option-${item.name}`}
+ onClick={(event) => {
+ event.preventDefault();
+ event.stopPropagation();
+ onChange(item.name);
+ setIsOpen(false);
+ }}
+ className={cn(
+ "flex flex-col items-stretch gap-0.5",
+ isSelected && "bg-[var(--oh-interactive-hover)]",
+ )}
+ >
+ <div className="flex min-w-0 items-center justify-between gap-2">
+ <span className="truncate">{item.name}</span>
+ {isSelected ? (
+ <CheckIcon className="size-4 shrink-0" aria-hidden />
+ ) : null}
+ </div>
+ {displayModel ? (
+ <span className="truncate text-xs leading-4 text-[var(--oh-muted)]">
+ {displayModel}
+ </span>
+ ) : null}
+ </ContextMenuListItem>
+ );
+ })}
+ </ContextMenu>
+ ) : null}
+ </div>
+ );
+}
+
+function SetupAgentProfilePill({
+ value,
+ onChange,
+}: {
+ value: string;
+ onChange: (profileId: string) => void;
+}) {
+ const { t } = useTranslation("openhands");
+ const { data, isLoading } = useAgentProfiles();
+ const profiles = (data?.profiles ?? []).filter(
+ (profile) => profile.id != null,
+ );
+ const activeProfile =
+ profiles.find((profile) => profile.id === data?.active_agent_profile_id) ??
+ null;
+ const [isOpen, setIsOpen] = useState(false);
+ const triggerRef = useRef<HTMLButtonElement>(null);
+ const popoverRef = useClickOutsideElement<HTMLUListElement>(
+ () => setIsOpen(false),
+ triggerRef,
+ );
+ const pinnedProfile =
+ profiles.find((profile) => profile.id === value.trim()) ?? null;
+ const displayName = pinnedProfile?.name ?? activeProfile?.name ?? null;
+ const pillLabel = displayName ?? t(I18nKey.CHAT$AGENT_PROFILE_PLACEHOLDER);
+ const canOpen = !isLoading && profiles.length > 0;
+ const tooltip = t(I18nKey.CHAT$AGENT_PROFILE_PLACEHOLDER);
+
+ return (
+ <div className="relative min-w-0">
+ <StyledTooltip content={tooltip} placement="top">
+ <button
+ ref={triggerRef}
+ type="button"
+ className={cn(
+ chatInputPillButtonClassName,
+ "max-w-[200px] rounded-lg",
+ )}
+ data-testid="automation-setup-agent-profile"
+ aria-label={displayName ?? pillLabel}
+ aria-expanded={isOpen}
+ aria-haspopup="dialog"
+ onMouseDown={(event) => event.preventDefault()}
+ onClick={(event) => {
+ event.preventDefault();
+ event.stopPropagation();
+ if (!canOpen) return;
+ setIsOpen((open) => !open);
+ }}
+ >
+ <span className="truncate">
+ {displayName ? truncateLabel(pillLabel) : pillLabel}
+ </span>
+ <ComboboxCaretInline isOpen={isOpen} />
+ </button>
+ </StyledTooltip>
+ {isOpen && canOpen ? (
+ <ContextMenu
+ ref={popoverRef}
+ testId="automation-setup-agent-profile-popover"
+ position="top"
+ alignment="left"
+ spacing="none"
+ className="z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto"
+ >
+ <ContextMenuListItem
+ testId="automation-setup-agent-profile-option-active"
+ onClick={(event) => {
+ event.preventDefault();
+ event.stopPropagation();
+ onChange("");
+ setIsOpen(false);
+ }}
+ className={cn(
+ "flex items-center justify-between gap-2",
+ !pinnedProfile && "bg-[var(--oh-interactive-hover)]",
+ )}
+ >
+ <span className="truncate">{t(I18nKey.COMMON$ACTIVE_PROFILE)}</span>
+ {!pinnedProfile ? (
+ <CheckIcon className="size-4 shrink-0" aria-hidden />
+ ) : null}
+ </ContextMenuListItem>
+ {profiles.map((profile) => {
+ const isSelected = profile.id === pinnedProfile?.id;
+ return (
+ <ContextMenuListItem
+ key={profile.id}
+ testId={`automation-setup-agent-profile-option-${profile.name}`}
+ onClick={(event) => {
+ event.preventDefault();
+ event.stopPropagation();
+ if (profile.id) onChange(profile.id);
+ setIsOpen(false);
+ }}
+ className={cn(
+ "flex flex-col items-stretch gap-0.5",
+ isSelected && "bg-[var(--oh-interactive-hover)]",
+ )}
+ >
+ <div className="flex min-w-0 items-center justify-between gap-2">
+ <span className="truncate">{profile.name}</span>
+ {isSelected ? (
+ <CheckIcon className="size-4 shrink-0" aria-hidden />
+ ) : null}
+ </div>
+ </ContextMenuListItem>
+ );
+ })}
+ </ContextMenu>
+ ) : null}
+ </div>
+ );
+}
+
+function AddRepositoryModal({
+ isOpen,
+ onClose,
+ onAdd,
+}: {
+ isOpen: boolean;
+ onClose: () => void;
+ onAdd: (address: string) => void;
+}) {
+ const { t } = useTranslation("openhands");
+ const [address, setAddress] = useState("");
+ const title = `${t(I18nKey.BUTTON$ADD)} ${t(I18nKey.AUTOMATIONS$DETAIL$REPOSITORIES)}`;
+
+ if (!isOpen) return null;
+
+ const trimmedAddress = address.trim();
+
+ return (
+ <ModalBackdrop onClose={onClose} aria-label={title}>
+ <form
+ onSubmit={(event) => {
+ event.preventDefault();
+ if (!trimmedAddress) return;
+ onAdd(trimmedAddress);
+ setAddress("");
+ onClose();
+ }}
+ data-testid="automation-setup-add-repository-modal"
+ className="relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary"
+ >
+ <ModalCloseButton
+ onClose={onClose}
+ testId="automation-setup-add-repository-modal-close"
+ />
+ <header className="flex-shrink-0 px-6 pb-4 pt-6">
+ <h2 className={cn("pr-6", modalTitleLgClassName)}>{title}</h2>
+ </header>
+ <div className="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar">
+ <SettingsInput
+ testId="automation-setup-repository-address"
+ label={t(I18nKey.CONVERSATION$REPOSITORY)}
+ type="text"
+ value={address}
+ onChange={setAddress}
+ placeholder={t(I18nKey.SETUP$REPOSITORY_PLACEHOLDER)}
+ showRequiredTag
+ />
+ </div>
+ <footer className="flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4">
+ <BrandButton
+ type="button"
+ variant="secondary"
+ onClick={onClose}
+ testId="automation-setup-add-repository-modal-dismiss"
+ >
+ {t(I18nKey.BUTTON$CLOSE)}
+ </BrandButton>
+ <BrandButton
+ type="submit"
+ variant="primary"
+ testId="automation-setup-repository-submit"
+ isDisabled={!trimmedAddress}
+ >
+ {t(I18nKey.BUTTON$ADD)}
+ </BrandButton>
+ </footer>
+ </form>
+ </ModalBackdrop>
+ );
+}
+
+export function AutomationSetupPromptStack({
+ prompt,
+ repository,
+ updatedSuffix,
+ repositorySuffix,
+ isStreaming,
+ errorText,
+ titleAction,
+ showTitle = true,
+ model,
+ agentProfileId,
+ onPromptChange,
+ onRepositoryChange,
+ onModelChange,
+ onAgentProfileChange,
+}: {
+ prompt: string;
+ repository: string;
+ updatedSuffix?: string;
+ repositorySuffix?: string;
+ isStreaming: boolean;
+ errorText?: string;
+ /** Sits on the Prompt title row, outside the field label. */
+ titleAction?: ReactNode;
+ /** The setup form owns the title when the kind toggle stays outside the crossfade. */
+ showTitle?: boolean;
+ model: string;
+ agentProfileId: string;
+ onPromptChange: (value: string) => void;
+ onRepositoryChange: (value: string) => void;
+ onModelChange: (profileName: string) => void;
+ onAgentProfileChange: (profileId: string) => void;
+}) {
+ const { t } = useTranslation("openhands");
+ const textareaRef = useRef<HTMLTextAreaElement>(null);
+ const { gripRef, isGripDragging, handleGripMouseDown, handleGripTouchStart } =
+ usePromptTextareaResize(textareaRef, { contentKey: prompt });
+ const [isRepositoryModalOpen, setIsRepositoryModalOpen] = useState(false);
+ const [isRepositoryMenuOpen, setIsRepositoryMenuOpen] = useState(false);
+ const [repositorySearch, setRepositorySearch] = useState("");
+ const repositoryAddRef = useRef<HTMLButtonElement>(null);
+ const repositoryMenuRef = useClickOutsideElement<HTMLDivElement>(
+ () => setIsRepositoryMenuOpen(false),
+ repositoryAddRef,
+ );
+ const isLocalBackend = getActiveBackend().backend.kind === "local";
+ const { providers } = useUserProviders();
+ const repositoryProvider: Provider | null = providers.includes("github")
+ ? "github"
+ : (providers[0] ?? (isLocalBackend ? "github" : null));
+ const repositoryQuery = useGitRepositories({
+ provider: repositoryProvider,
+ enabled: isRepositoryMenuOpen && repositoryProvider !== null,
+ allowMissingProvider: isLocalBackend,
+ });
+ const repositories = parseRepositories(repository);
+ const repositoryPages = repositoryQuery.data?.pages ?? [];
+ const isLocalGithubTokenMissing =
+ isLocalBackend && repositoryPages.some((page) => page.missing_token);
+ const isRepositoryListLoading = repositoryQuery.isLoading;
+ const isRepositoryListError = repositoryQuery.isError;
+ const repositoryNames = repositoryPages
+ .flatMap((page) => page.items)
+ .map((repo) => repo.full_name);
+ const repositorySearchText = repositorySearch.trim().toLowerCase();
+ const listedRepositoryNames = repositoryNames.filter(
+ (name, index, names) =>
+ !repositories.includes(name) && names.indexOf(name) === index,
+ );
+ const visibleRepositoryNames = repositorySearchText
+ ? listedRepositoryNames.filter((name) =>
+ name.toLowerCase().includes(repositorySearchText),
+ )
+ : listedRepositoryNames;
+ const addLabel = `${t(I18nKey.BUTTON$ADD)} ${t(I18nKey.AUTOMATIONS$DETAIL$REPOSITORIES)}`;
+
+ const writeRepositories = (next: string[]) => {
+ onRepositoryChange(next.join(", "));
+ };
+
+ return (
+ <div
+ className={cn(
+ "flex w-full min-w-0 flex-col gap-2.5",
+ isRepositoryMenuOpen && "relative z-30",
+ )}
+ >
+ {showTitle ? (
+ <div className="flex w-full items-center gap-2">
+ <span className="flex items-center gap-2 text-sm">
+ {t(I18nKey.AUTOMATIONS$PROMPT)}
+ {updatedSuffix ? (
+ <span className="font-normal text-[var(--oh-muted)]">
+ {updatedSuffix}
+ </span>
+ ) : null}
+ </span>
+ {titleAction ? (
+ <div className="ml-auto shrink-0">{titleAction}</div>
+ ) : null}
+ </div>
+ ) : null}
+ <label
+ data-streaming-active={isStreaming ? "true" : undefined}
+ className="flex w-full min-w-0 flex-col gap-2.5"
+ >
+ <div
+ data-testid="automation-setup-prompt-stack"
+ className="relative w-full"
+ >
+ <div
+ data-testid="automation-setup-prompt-container"
+ className="relative z-10 -mb-[15px] flex flex-col rounded-[15px] border border-[var(--oh-border)] bg-[var(--oh-surface)] p-4"
+ >
+ <textarea
+ ref={textareaRef}
+ data-testid="automation-setup-prompt"
+ name="prompt"
+ value={prompt}
+ onChange={(event) => onPromptChange(event.target.value)}
+ placeholder={t(I18nKey.HOME$AUTOMATE_PROMPT_PLACEHOLDER)}
+ rows={5}
+ className="min-h-[120px] w-full resize-none border-0 bg-transparent p-0 text-sm text-content outline-none placeholder:text-tertiary-alt"
+ />
+ <div className="flex min-w-0 items-center gap-2 pt-2">
+ <SetupModelPill value={model} onChange={onModelChange} />
+ <SetupAgentProfilePill
+ value={agentProfileId}
+ onChange={onAgentProfileChange}
+ />
+ </div>
+ <div
+ data-testid="automation-setup-prompt-grip"
+ className="group absolute bottom-0 left-0 z-20 h-3 w-full"
+ >
+ <div
+ className="absolute inset-0 z-[1] cursor-ns-resize select-none"
+ onMouseDown={handleGripMouseDown}
+ onTouchStart={handleGripTouchStart}
+ aria-hidden
+ />
+ <div
+ ref={gripRef}
+ className={cn(
+ "pointer-events-none absolute bottom-0 left-0 z-[2] h-px w-full bg-white transition-opacity duration-200",
+ isGripDragging
+ ? "opacity-100"
+ : "opacity-0 group-hover:opacity-100",
+ )}
+ />
+ </div>
+ </div>
+ <div
+ data-testid="automation-setup-prompt-drawer"
+ className="flex min-h-9 items-center rounded-b-[15px] border-x border-b border-[var(--oh-border)] bg-[var(--oh-surface-raised)] px-4 pb-2 pt-[calc(15px+0.5rem)]"
+ >
+ <div
+ data-testid="automation-setup-repository"
+ className="flex w-full min-w-0 items-start gap-1"
+ >
+ <div className="relative flex shrink-0 items-center gap-2">
+ <span className="text-sm">
+ {t(I18nKey.AUTOMATIONS$DETAIL$REPOSITORIES)}
+ </span>
+ {repositorySuffix ? (
+ <span className="text-xs text-[var(--oh-muted)]">
+ {repositorySuffix}
+ </span>
+ ) : null}
+ <button
+ ref={repositoryAddRef}
+ type="button"
+ data-testid="automation-setup-repository-add"
+ aria-label={addLabel}
+ aria-haspopup="menu"
+ aria-expanded={isRepositoryMenuOpen}
+ className="inline-flex size-6 shrink-0 items-center justify-center rounded-md text-[var(--oh-muted)] hover:bg-white/10 hover:text-white"
+ onMouseDown={(event) => event.preventDefault()}
+ onClick={() => {
+ setRepositorySearch("");
+ setIsRepositoryMenuOpen((open) => !open);
+ }}
+ >
+ <Plus className="size-4" aria-hidden />
+ </button>
+ {isLocalGithubTokenMissing ? (
+ <StyledTooltip
+ content={t(
+ I18nKey.AUTOMATION_SETUP$GITHUB_TOKEN_REQUIRED_TOOLTIP,
+ )}
+ placement="top"
+ >
+ <button
+ type="button"
+ aria-label={t(
+ I18nKey.AUTOMATION_SETUP$GITHUB_TOKEN_REQUIRED_TOOLTIP,
+ )}
+ data-testid="automation-setup-repository-token-tooltip"
+ className="inline-flex size-5 shrink-0 items-center justify-center rounded-full text-[var(--oh-muted)]"
+ onMouseDown={(event) => event.preventDefault()}
+ >
+ <Info className="size-4" aria-hidden />
+ </button>
+ </StyledTooltip>
+ ) : null}
+ {isRepositoryMenuOpen ? (
+ <div
+ ref={repositoryMenuRef}
+ role="menu"
+ data-testid="automation-setup-repository-menu"
+ className="absolute top-full left-0 z-[60] mt-1 flex max-h-72 w-[260px] flex-col overflow-hidden rounded-md border border-border-subtle bg-tertiary py-1 shadow-lg"
+ >
+ <div className="shrink-0 px-2">
+ <div className="relative">
+ <SearchIcon
+ width={16}
+ height={16}
+ aria-hidden
+ className="pointer-events-none absolute top-1/2 left-0 -translate-y-1/2 text-muted"
+ />
+ <input
+ type="text"
+ data-testid="automation-setup-repository-search"
+ value={repositorySearch}
+ onChange={(event) =>
+ setRepositorySearch(event.target.value)
+ }
+ onKeyDown={(event) => event.stopPropagation()}
+ placeholder={t(I18nKey.COMMON$SEARCH_REPOSITORIES)}
+ aria-label={t(I18nKey.COMMON$SEARCH_REPOSITORIES)}
+ className="w-full border-0 bg-transparent py-1.5 pr-0 pl-6 text-sm text-contrast outline-none placeholder:text-muted focus:ring-0 focus:outline-none"
+ />
+ </div>
+ </div>
+ <Divider inset="menu" />
+ <div
+ className="min-h-0 flex-1 overflow-y-auto px-1"
+ onScroll={(event) => {
+ const list = event.currentTarget;
+ if (
+ list.scrollTop + list.clientHeight >=
+ list.scrollHeight - 24
+ ) {
+ repositoryQuery.onLoadMore();
+ }
+ }}
+ >
+ {isRepositoryListError ? (
+ <p
+ data-testid="automation-setup-repository-error"
+ className="px-2 py-2 text-sm text-[var(--oh-warning)]"
+ >
+ {t(I18nKey.HOME$FAILED_TO_LOAD_REPOSITORIES)}
+ </p>
+ ) : isRepositoryListLoading &&
+ visibleRepositoryNames.length === 0 ? (
+ <div
+ data-testid="automation-setup-repository-loading"
+ className="flex items-center justify-center py-3"
+ >
+ <LoadingSpinner size="small" />
+ </div>
+ ) : (
+ visibleRepositoryNames.map((name) => (
+ <ContextMenuListItem
+ key={name}
+ testId={`automation-setup-repository-option-${name}`}
+ onClick={(event) => {
+ event.preventDefault();
+ event.stopPropagation();
+ writeRepositories([...repositories, name]);
+ setIsRepositoryMenuOpen(false);
+ }}
+ className="flex w-full items-center"
+ >
+ <span className="truncate">{name}</span>
+ </ContextMenuListItem>
+ ))
+ )}
+ {repositorySearchText &&
+ !isRepositoryListLoading &&
+ !isRepositoryListError &&
+ visibleRepositoryNames.length === 0 ? (
+ <p className="px-2 py-2 text-sm text-muted italic">
+ {t(I18nKey.GITHUB$NO_RESULTS)}
+ </p>
+ ) : null}
+ </div>
+ <Divider
+ inset="menu"
+ testId="automation-setup-repository-custom-divider"
+ />
+ <div className="shrink-0 px-1">
+ <ContextMenuListItem
+ testId="automation-setup-repository-custom"
+ onClick={(event) => {
+ event.preventDefault();
+ event.stopPropagation();
+ setIsRepositoryMenuOpen(false);
+ setIsRepositoryModalOpen(true);
+ }}
+ className="flex w-full items-center"
+ >
+ <span className="truncate">
+ {t(I18nKey.AUTOMATION_SETUP$TYPE_CUSTOM)}
+ </span>
+ </ContextMenuListItem>
+ </div>
+ </div>
+ ) : null}
+ </div>
+ <div
+ data-testid="automation-setup-repository-values"
+ className="flex min-w-0 flex-1 flex-wrap items-center gap-1"
+ >
+ {repositories.map((item) => (
+ <span
+ key={item}
+ data-testid="automation-setup-repository-value"
+ className={cn(
+ extensionModuleCardPillClassName,
+ "gap-1 pr-1",
+ )}
+ >
+ <span className="truncate">{item}</span>
+ <button
+ type="button"
+ data-testid="automation-setup-repository-remove"
+ aria-label={`${t(I18nKey.COMMON$REMOVE)} ${item}`}
+ className="inline-flex size-4 items-center justify-center rounded-full text-tertiary-light hover:bg-white/10 hover:text-white"
+ onMouseDown={(event) => event.preventDefault()}
+ onClick={() =>
+ writeRepositories(
+ repositories.filter((entry) => entry !== item),
+ )
+ }
+ >
+ <X className="size-3" aria-hidden />
+ </button>
+ </span>
+ ))}
+ </div>
+ </div>
+ </div>
+ </div>
+ {errorText ? (
+ <span
+ role="alert"
+ className="text-xs leading-5 text-[var(--oh-warning)]"
+ >
+ {errorText}
+ </span>
+ ) : null}
+ </label>
+ <AddRepositoryModal
+ isOpen={isRepositoryModalOpen}
+ onClose={() => setIsRepositoryModalOpen(false)}
+ onAdd={(address) => {
+ if (repositories.includes(address)) return;
+ writeRepositories([...repositories, address]);
+ }}
+ />
+ </div>
+ );
+}
diff --git a/src/components/features/chat/chat-interface.tsx b/src/components/features/chat/chat-interface.tsx
index fe6394c33d..70f77459d9 100644
--- a/src/components/features/chat/chat-interface.tsx
+++ b/src/components/features/chat/chat-interface.tsx
@@ -1,4 +1,5 @@
import React from "react";
+import { createPortal } from "react-dom";
import { useNavigate } from "react-router";
import { useTracking } from "#/hooks/use-tracking";
import { useTranslation } from "react-i18next";
@@ -54,6 +55,7 @@ import { useOptionalConversationId } from "#/hooks/use-conversation-id";
import { useActiveConversation } from "#/hooks/query/use-active-conversation";
import { I18nKey } from "#/i18n/declaration";
import { hasConversationStarted } from "./components/resolve-picker-kind";
+import { ComposerDockedProvider } from "#/context/composer-docked-context";
function getEntryPoint(
hasRepository: boolean | null,
@@ -64,7 +66,21 @@ function getEntryPoint(
return "direct";
}
-export function ChatInterface() {
+export function ChatInterface({
+ showGitControlBar = true,
+ showEmptyStateSuggestions = true,
+ composerDockTarget = null,
+ onDockedComposerSubmit,
+ minimalComposer = false,
+ composerPlaceholder,
+}: {
+ showGitControlBar?: boolean;
+ showEmptyStateSuggestions?: boolean;
+ composerDockTarget?: HTMLElement | null;
+ onDockedComposerSubmit?: () => void;
+ minimalComposer?: boolean;
+ composerPlaceholder?: string;
+} = {}) {
useAutoRefreshFilesOnEdit();
const { trackInitialQuerySubmitted, trackUserMessageSent } = useTracking();
@@ -500,6 +516,33 @@ export function ChatInterface() {
t,
});
+ const isComposerDocked = Boolean(composerDockTarget);
+ const isMinimalComposer = isComposerDocked || minimalComposer;
+ const composer = (
+ <ComposerDockedProvider
+ enabled={isComposerDocked}
+ minimal={isMinimalComposer}
+ >
+ <InteractiveChatBox
+ onSubmit={(content, images, files) => {
+ if (isComposerDocked) onDockedComposerSubmit?.();
+ return handleSendMessage(content, images, files);
+ }}
+ disabled={isNewConversationPending || llmBlocked}
+ hasStartedConversation={hasStartedConversation}
+ showGitControlBar={showGitControlBar}
+ placeholder={
+ isMinimalComposer
+ ? t(I18nKey.AUTOMATION_SETUP$DOCKED_COMPOSER_PLACEHOLDER)
+ : composerPlaceholder
+ }
+ />
+ </ComposerDockedProvider>
+ );
+ const dockedOrInlineComposer = composerDockTarget
+ ? createPortal(composer, composerDockTarget)
+ : composer;
+
return (
<WorkspaceFilesForChatProvider>
<ScrollProvider value={scrollProviderValue}>
@@ -519,7 +562,8 @@ export function ChatInterface() {
// disabled). They're also a `pointer-events-auto` overlay that would
// sit over the LlmNotConfiguredBanner below and swallow clicks on its
// setup button — so hide them and let the banner be the lone CTA.
- !llmBlocked && (
+ !llmBlocked &&
+ showEmptyStateSuggestions && (
<ChatSuggestions
onSuggestionsClick={(message) => setMessageToSend(message)}
/>
@@ -674,11 +718,7 @@ export function ChatInterface() {
</div>
</div>
- <InteractiveChatBox
- onSubmit={handleSendMessage}
- disabled={isNewConversationPending || llmBlocked}
- hasStartedConversation={hasStartedConversation}
- />
+ {dockedOrInlineComposer}
</div>
)}
</div>
diff --git a/src/components/features/chat/components/chat-input-actions.tsx b/src/components/features/chat/components/chat-input-actions.tsx
index 27703daf64..de7765686a 100644
--- a/src/components/features/chat/components/chat-input-actions.tsx
+++ b/src/components/features/chat/components/chat-input-actions.tsx
@@ -39,6 +39,7 @@ import { ContextMenu } from "#/ui/context-menu";
import { useClickOutsideElement } from "#/hooks/use-click-outside-element";
import { useCloseOnEscape } from "#/hooks/use-close-on-escape";
import { cn } from "#/utils/utils";
+import { useComposerDockedMinimal } from "#/context/composer-docked-context";
import {
chatInputIconButtonClassName,
formControlTransitionClassName,
@@ -69,6 +70,7 @@ export function ChatInputActions({
isDictationDisabled = false,
}: ChatInputActionsProps) {
const { t } = useTranslation("openhands");
+ const isComposerDockedMinimal = useComposerDockedMinimal();
const unifiedPauseMutation = useUnifiedPauseConversation();
const pauseConversationMutation = usePauseConversation();
const resumeConversationMutation = useResumeConversation();
@@ -458,6 +460,23 @@ export function ChatInputActions({
</ContextMenu>
);
+ if (isComposerDockedMinimal) {
+ return (
+ <div
+ data-testid="chat-input-actions-minimal"
+ className="w-full min-w-0 flex items-center justify-end gap-2"
+ >
+ {showButton ? (
+ <ChatSendButton
+ buttonClassName={buttonClassName}
+ handleSubmit={handleSubmit}
+ disabled={disabled || !canSubmit}
+ />
+ ) : null}
+ </div>
+ );
+ }
+
return (
<div
ref={actionsRowRef}
diff --git a/src/components/features/chat/interactive-chat-box.tsx b/src/components/features/chat/interactive-chat-box.tsx
index 1fbff59f2b..2eb6ae08a5 100644
--- a/src/components/features/chat/interactive-chat-box.tsx
+++ b/src/components/features/chat/interactive-chat-box.tsx
@@ -18,12 +18,16 @@ interface InteractiveChatBoxProps {
onSubmit: (message: string, images: File[], files: File[]) => void;
disabled?: boolean;
hasStartedConversation?: boolean;
+ showGitControlBar?: boolean;
+ placeholder?: string;
}
export function InteractiveChatBox({
onSubmit,
disabled = false,
hasStartedConversation,
+ showGitControlBar = true,
+ placeholder,
}: InteractiveChatBoxProps) {
const {
images,
@@ -79,12 +83,15 @@ export function InteractiveChatBox({
disabled={isDisabled}
isNewConversationPending={disabled}
hasStartedConversation={hasStartedConversation}
+ placeholder={placeholder}
onSubmit={handleSubmit}
onFilesPaste={handleUpload}
/>
- <div className="mt-3 pb-3">
- <GitControlBar onSuggestionsClick={handleSuggestionsClick} />
- </div>
+ {showGitControlBar ? (
+ <div className="mt-3 pb-3" data-testid="chat-git-control-bar">
+ <GitControlBar onSuggestionsClick={handleSuggestionsClick} />
+ </div>
+ ) : null}
</div>
);
}
diff --git a/src/components/features/conversation/conversation-main/chat-interface-wrapper.tsx b/src/components/features/conversation/conversation-main/chat-interface-wrapper.tsx
index 2c82de4e13..ab99d59b64 100644
--- a/src/components/features/conversation/conversation-main/chat-interface-wrapper.tsx
+++ b/src/components/features/conversation/conversation-main/chat-interface-wrapper.tsx
@@ -12,6 +12,12 @@ import {
interface ChatInterfaceWrapperProps {
isRightPanelShown: boolean;
+ showGitControlBar?: boolean;
+ showEmptyStateSuggestions?: boolean;
+ composerDockTarget?: HTMLElement | null;
+ onDockedComposerSubmit?: () => void;
+ minimalComposer?: boolean;
+ composerPlaceholder?: string;
}
const THREAD_CLASSNAME =
@@ -19,6 +25,12 @@ const THREAD_CLASSNAME =
export function ChatInterfaceWrapper({
isRightPanelShown: _isRightPanelShown,
+ showGitControlBar = true,
+ showEmptyStateSuggestions = true,
+ composerDockTarget = null,
+ onDockedComposerSubmit,
+ minimalComposer = false,
+ composerPlaceholder,
}: ChatInterfaceWrapperProps) {
const isMobile = useBreakpoint();
const reduceMotion = useReducedMotion();
@@ -41,7 +53,14 @@ export function ChatInterfaceWrapper({
>
<div className="flex min-h-0 min-w-0 flex-1 justify-center overflow-hidden">
<div className={THREAD_CLASSNAME}>
- <ChatInterface />
+ <ChatInterface
+ showGitControlBar={showGitControlBar}
+ showEmptyStateSuggestions={showEmptyStateSuggestions}
+ composerDockTarget={composerDockTarget}
+ onDockedComposerSubmit={onDockedComposerSubmit}
+ minimalComposer={minimalComposer}
+ composerPlaceholder={composerPlaceholder}
+ />
</div>
</div>
<AnimatePresence>
diff --git a/src/components/features/conversation/conversation-main/conversation-main.tsx b/src/components/features/conversation/conversation-main/conversation-main.tsx
index 24562a6a2a..dfa0002f92 100644
--- a/src/components/features/conversation/conversation-main/conversation-main.tsx
+++ b/src/components/features/conversation/conversation-main/conversation-main.tsx
@@ -1,4 +1,10 @@
+import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
+import { ArrowLeft, FileText, MessageSquare } from "lucide-react";
import { cn } from "#/utils/utils";
+import { ChatActionTooltip } from "#/components/features/chat/chat-action-tooltip";
+import BlockDrawerLeftIcon from "#/icons/block-drawer-left.svg?react";
+import { mobileTopBarIconButtonClassName } from "#/utils/mobile-top-bar-icon-button-classes";
import { ChatInterfaceWrapper } from "./chat-interface-wrapper";
import { ConversationTabContent } from "../conversation-tabs/conversation-tab-content/conversation-tab-content";
import { ConversationNameWithStatus } from "../conversation-name-with-status";
@@ -6,6 +12,11 @@ import { ConversationTabs } from "../conversation-tabs/conversation-tabs";
import { ResizeHandle } from "../../../ui/resize-handle";
import { useResizablePanels } from "#/hooks/use-resizable-panels";
import { useConversationStore } from "#/stores/conversation-store";
+import { AUTOMATION_SETUP_SHOW_AGENT_EVENT } from "#/components/features/automations/setup/automation-setup-agent-request";
+import { AutomationSetupPanel } from "#/components/features/automations/setup/automation-setup-panel";
+import { consumeAutomationSetupHandoff } from "#/api/automation-setup-handoff-store";
+import type { AutomationSetupDraft } from "#/api/automation-setup-types";
+import { useConversationId } from "#/hooks/use-conversation-id";
import {
useBreakpoint,
SIDEBAR_RAIL_COLLAPSE_MAX_WIDTH,
@@ -13,6 +24,54 @@ import {
import { SidebarMobileMenuToggle } from "#/components/features/sidebar/sidebar-mobile-menu-toggle";
import { ConversationOverviewDrawer } from "../conversation-overview-drawer";
import { useConversationOverviewDrawerOptional } from "../conversation-overview-drawer-context";
+import { useNavigation } from "#/context/navigation-context";
+import { useActiveConversation } from "#/hooks/query/use-active-conversation";
+import { I18nKey } from "#/i18n/declaration";
+import { formControlTransitionClassName } from "#/utils/form-control-classes";
+
+const SPLASH_ROUTE = "/";
+
+const BLANK_AUTOMATION_SETUP_DRAFT: AutomationSetupDraft = {
+ prompt: "",
+ kind: "prompt",
+};
+
+type MobileAutomationView = "form" | "conversation";
+
+const MOBILE_AUTOMATION_VIEW_OPTIONS: {
+ view: MobileAutomationView;
+ labelKey: I18nKey;
+ Icon: typeof FileText;
+}[] = [
+ {
+ view: "form",
+ labelKey: I18nKey.AUTOMATION_SETUP$VIEW_FORM,
+ Icon: FileText,
+ },
+ {
+ view: "conversation",
+ labelKey: I18nKey.AUTOMATION_SETUP$VIEW_CONVERSATION,
+ Icon: MessageSquare,
+ },
+];
+
+function AutomationSetupDockedComposer({
+ onTarget,
+}: {
+ onTarget: (element: HTMLDivElement | null) => void;
+}) {
+ return (
+ <div className="custom-scrollbar-always pointer-events-none absolute inset-0 z-20 overflow-y-scroll px-5 [scrollbar-gutter:stable] [&::-webkit-scrollbar-thumb]:bg-transparent">
+ <div className="relative mx-auto h-full w-full min-w-0 max-w-[800px]">
+ <div
+ ref={onTarget}
+ data-testid="automation-setup-docked-composer"
+ className="pointer-events-auto absolute inset-x-0 bottom-5 overflow-visible rounded-[15px] shadow-[0_12px_40px_rgba(0,0,0,0.55)]"
+ />
+ </div>
+ </div>
+ );
+}
function getDesktopTabPanelClass(isRightPanelShown: boolean) {
return isRightPanelShown
@@ -21,11 +80,31 @@ function getDesktopTabPanelClass(isRightPanelShown: boolean) {
}
export function ConversationMain() {
+ const { t } = useTranslation("openhands");
+ const { navigate } = useNavigation();
+ const { conversationId } = useConversationId();
+ const { data: conversation } = useActiveConversation();
const isMobile = useBreakpoint();
const isSidebarRailHidden = useBreakpoint(SIDEBAR_RAIL_COLLAPSE_MAX_WIDTH);
- const { isRightPanelShown } = useConversationStore();
+ const { isRightPanelShown, setHasRightPanelToggled, setIsRightPanelShown } =
+ useConversationStore();
+ const [isAutomationSetupMode, setIsAutomationSetupMode] = useState(() =>
+ consumeAutomationSetupHandoff(conversationId),
+ );
+ const [automationToolbarElement, setAutomationToolbarElement] =
+ useState<HTMLDivElement | null>(null);
+ const [isAutomationAgentHidden, setIsAutomationAgentHidden] = useState(false);
+ const [mobileAutomationView, setMobileAutomationView] =
+ useState<MobileAutomationView>("form");
+ const [composerDockTarget, setComposerDockTarget] =
+ useState<HTMLDivElement | null>(null);
const overviewDrawer = useConversationOverviewDrawerOptional();
const isSecondaryDrawerOpen = Boolean(overviewDrawer?.section);
+ const automationSetupDraft = isAutomationSetupMode
+ ? BLANK_AUTOMATION_SETUP_DRAFT
+ : null;
+ const showMobileAutomationForm =
+ isMobile && isAutomationSetupMode && mobileAutomationView === "form";
const { leftWidth, rightWidth, isDragging, containerRef, handleMouseDown } =
useResizablePanels({
@@ -35,6 +114,42 @@ export function ConversationMain() {
storageKey: "desktop-layout-panel-width",
});
+ useEffect(() => {
+ setIsAutomationSetupMode(consumeAutomationSetupHandoff(conversationId));
+ }, [conversationId]);
+
+ useEffect(() => {
+ if (!automationSetupDraft) return;
+ setHasRightPanelToggled(true);
+ setIsRightPanelShown(true);
+ }, [automationSetupDraft, setHasRightPanelToggled, setIsRightPanelShown]);
+
+ useEffect(() => {
+ if (!automationSetupDraft) {
+ setIsAutomationAgentHidden(false);
+ }
+ }, [automationSetupDraft]);
+
+ const handleBackToSplash = () => {
+ navigate(SPLASH_ROUTE);
+ };
+
+ useEffect(() => {
+ const showAgent = () => {
+ setIsAutomationAgentHidden(false);
+ setMobileAutomationView("conversation");
+ };
+ window.addEventListener(AUTOMATION_SETUP_SHOW_AGENT_EVENT, showAgent);
+ return () =>
+ window.removeEventListener(AUTOMATION_SETUP_SHOW_AGENT_EVENT, showAgent);
+ }, []);
+
+ const showDockedComposer = isAutomationSetupMode && isAutomationAgentHidden;
+ const agentToggleLabel = isAutomationAgentHidden
+ ? t(I18nKey.AUTOMATION_SETUP$SHOW_AGENT)
+ : t(I18nKey.AUTOMATION_SETUP$HIDE_AGENT);
+ const setupTitle = conversation?.title || t(I18nKey.AUTOMATION_SETUP$TITLE);
+
return (
<div
className={cn(
@@ -43,6 +158,116 @@ export function ConversationMain() {
: "h-full flex flex-col overflow-hidden",
)}
>
+ {isAutomationSetupMode ? (
+ <header
+ data-testid="automation-setup-topbar"
+ className={cn(
+ "flex shrink-0 border-b border-[var(--oh-border)] bg-base",
+ isMobile
+ ? "flex-col"
+ : "h-10 min-h-10 items-center justify-between gap-2 px-3",
+ )}
+ >
+ <div
+ className={cn(
+ "flex min-w-0 items-center gap-2",
+ isMobile && "h-10 justify-between px-3",
+ )}
+ >
+ <div className="flex min-w-0 flex-1 items-center gap-2">
+ {isSidebarRailHidden ? <SidebarMobileMenuToggle /> : null}
+ {!isMobile ? (
+ <button
+ type="button"
+ data-testid="automation-setup-back"
+ aria-label={t(I18nKey.AUTOMATION_SETUP$BACK_LABEL)}
+ onClick={handleBackToSplash}
+ className={cn(
+ "flex size-7 items-center justify-center rounded-lg text-[var(--oh-muted)] hover:bg-white/10 hover:text-white",
+ formControlTransitionClassName,
+ )}
+ >
+ <ArrowLeft className="size-4" aria-hidden />
+ </button>
+ ) : null}
+ <h1
+ data-testid="automation-setup-conversation-title"
+ className="min-w-0 truncate text-sm font-semibold text-content"
+ >
+ {setupTitle}
+ </h1>
+ </div>
+ {isMobile ? (
+ <div
+ role="group"
+ aria-label={`${t(I18nKey.AUTOMATION_SETUP$VIEW_FORM)} / ${t(I18nKey.AUTOMATION_SETUP$VIEW_CONVERSATION)}`}
+ className="flex shrink-0 overflow-hidden rounded-lg border border-[var(--oh-border)]"
+ >
+ {MOBILE_AUTOMATION_VIEW_OPTIONS.map(
+ ({ view, labelKey, Icon }) => {
+ const label = t(labelKey);
+ return (
+ <button
+ key={view}
+ type="button"
+ data-testid={`automation-setup-mobile-view-${view}`}
+ aria-label={label}
+ aria-pressed={mobileAutomationView === view}
+ title={label}
+ onClick={() => setMobileAutomationView(view)}
+ className={cn(
+ "inline-flex size-7 items-center justify-center",
+ mobileAutomationView === view
+ ? "bg-tertiary text-content"
+ : "text-[var(--oh-muted)]",
+ )}
+ >
+ <Icon className="size-4" aria-hidden />
+ </button>
+ );
+ },
+ )}
+ </div>
+ ) : null}
+ </div>
+ <div
+ className={cn(
+ "flex min-w-0 items-center gap-1.5",
+ isMobile ? "overflow-x-auto px-3 pb-2" : "shrink-0",
+ isMobile && mobileAutomationView === "conversation" && "hidden",
+ )}
+ >
+ <div
+ ref={setAutomationToolbarElement}
+ data-testid="automation-setup-toolbar"
+ className="flex min-w-0 shrink-0 items-center gap-1.5"
+ />
+ {!isMobile ? (
+ <ChatActionTooltip
+ tooltip={agentToggleLabel}
+ ariaLabel={agentToggleLabel}
+ >
+ <button
+ type="button"
+ data-testid="automation-setup-agent-toggle"
+ aria-label={agentToggleLabel}
+ aria-pressed={!isAutomationAgentHidden}
+ onClick={() =>
+ setIsAutomationAgentHidden((previous) => !previous)
+ }
+ className={cn(
+ mobileTopBarIconButtonClassName,
+ "size-7 self-center",
+ )}
+ >
+ <BlockDrawerLeftIcon className="size-5 shrink-0" />
+ </button>
+ </ChatActionTooltip>
+ ) : null}
+ </div>
+ </header>
+ ) : null}
+
<div
ref={containerRef}
className={cn(
@@ -60,12 +285,16 @@ export function ConversationMain() {
Owns its own header (name + status) and gets bottom padding so the
chat input doesn't slam the floor. */}
<div
+ data-testid="conversation-chat-panel"
className={cn(
"flex flex-col bg-base overflow-hidden",
isMobile
- ? "flex-1"
+ ? cn("flex-1", showMobileAutomationForm && "hidden")
: cn(
"min-w-0",
+ isAutomationSetupMode &&
+ isAutomationAgentHidden &&
+ "pointer-events-none opacity-0",
!isSecondaryDrawerOpen &&
"transition-[width] duration-300 ease-in-out",
),
@@ -74,60 +303,129 @@ export function ConversationMain() {
style={
!isMobile
? {
- width: isRightPanelShown ? `${leftWidth}%` : "100%",
+ width:
+ isAutomationSetupMode && isAutomationAgentHidden
+ ? "0%"
+ : isRightPanelShown
+ ? `${leftWidth}%`
+ : "100%",
transitionProperty:
isDragging || isSecondaryDrawerOpen ? "none" : "width",
}
: undefined
}
>
- <div
- data-testid="chat-pane-header"
- className={cn(
- "flex h-10 min-h-10 shrink-0 items-center",
- isSidebarRailHidden && "gap-2 pl-2.5",
- )}
- >
- {isSidebarRailHidden ? <SidebarMobileMenuToggle /> : null}
- <div className="min-w-0 flex-1">
- <ConversationNameWithStatus />
+ {!isAutomationSetupMode ? (
+ <div
+ data-testid="chat-pane-header"
+ className={cn(
+ "flex h-10 min-h-10 shrink-0 items-center",
+ isSidebarRailHidden && "gap-2 pl-2.5",
+ )}
+ >
+ {isSidebarRailHidden ? <SidebarMobileMenuToggle /> : null}
+ <div className="min-w-0 flex-1">
+ <ConversationNameWithStatus />
+ </div>
</div>
- </div>
+ ) : null}
<div className="flex-1 min-h-0 flex flex-col">
<ChatInterfaceWrapper
isRightPanelShown={!isMobile && isRightPanelShown}
+ showGitControlBar={!isAutomationSetupMode}
+ showEmptyStateSuggestions={!isAutomationSetupMode}
+ composerDockTarget={composerDockTarget}
+ minimalComposer={isMobile && isAutomationSetupMode}
+ composerPlaceholder={
+ isAutomationSetupMode
+ ? t(
+ I18nKey.AUTOMATION_SETUP$CONVERSATION_COMPOSER_PLACEHOLDER,
+ )
+ : undefined
+ }
+ onDockedComposerSubmit={() => {
+ setIsAutomationAgentHidden(false);
+ setMobileAutomationView("conversation");
+ }}
/>
</div>
</div>
{/* Resize Handle - only shown on desktop when right panel is visible */}
- {!isMobile && isRightPanelShown && (
- <ResizeHandle onMouseDown={handleMouseDown} isDragging={isDragging} />
- )}
+ {!isMobile &&
+ isRightPanelShown &&
+ !(isAutomationSetupMode && isAutomationAgentHidden) && (
+ <ResizeHandle
+ onMouseDown={handleMouseDown}
+ isDragging={isDragging}
+ />
+ )}
+
+ {showMobileAutomationForm && automationSetupDraft ? (
+ <div
+ data-testid="automation-setup-mobile-form"
+ className="relative flex min-h-0 flex-1 flex-col overflow-hidden"
+ >
+ <AutomationSetupPanel
+ draft={automationSetupDraft}
+ toolbarPortal={automationToolbarElement}
+ showInlineHeader={false}
+ reserveComposerSpace
+ />
+ <AutomationSetupDockedComposer onTarget={setComposerDockTarget} />
+ </div>
+ ) : null}
{/* Right panel: desktop side drawer. Mobile opens Files/Tools via /panel route. */}
{!isMobile && (
<div
+ data-testid="conversation-right-panel"
className={cn(
"transition-all duration-300 ease-in-out overflow-hidden",
getDesktopTabPanelClass(isRightPanelShown),
)}
style={{
- width: isRightPanelShown ? `${rightWidth}%` : "0%",
+ width: isRightPanelShown
+ ? isAutomationSetupMode && isAutomationAgentHidden
+ ? "100%"
+ : `${rightWidth}%`
+ : "0%",
transitionProperty: isDragging ? "opacity, transform" : "all",
}}
>
<div className="flex h-full w-full flex-col">
- <div className="flex flex-col flex-1 min-h-0 bg-surface border-l border-border overflow-hidden">
- <div
- data-testid="tabs-pane-header"
- className="flex shrink-0 flex-col border-b border-border"
- >
- <ConversationTabs isPanelResizing={isDragging} />
- </div>
- <div className="flex-1 min-h-0 flex flex-col">
- <ConversationTabContent />
- </div>
+ <div
+ className={cn(
+ "relative flex flex-col flex-1 min-h-0 bg-surface overflow-hidden",
+ !(isAutomationSetupMode && isAutomationAgentHidden) &&
+ "border-l border-border",
+ )}
+ >
+ {automationSetupDraft ? (
+ <AutomationSetupPanel
+ draft={automationSetupDraft}
+ toolbarPortal={automationToolbarElement}
+ showInlineHeader={false}
+ reserveComposerSpace={showDockedComposer}
+ />
+ ) : (
+ <>
+ <div
+ data-testid="tabs-pane-header"
+ className="flex shrink-0 flex-col border-b border-border"
+ >
+ <ConversationTabs isPanelResizing={isDragging} />
+ </div>
+ <div className="flex-1 min-h-0 flex flex-col">
+ <ConversationTabContent />
+ </div>
+ </>
+ )}
+ {showDockedComposer ? (
+ <AutomationSetupDockedComposer
+ onTarget={setComposerDockTarget}
+ />
+ ) : null}
</div>
</div>
</div>
diff --git a/src/components/features/home/home-chat-launcher.tsx b/src/components/features/home/home-chat-launcher.tsx
index 294e3aecb1..e27374dadf 100644
--- a/src/components/features/home/home-chat-launcher.tsx
+++ b/src/components/features/home/home-chat-launcher.tsx
@@ -33,6 +33,7 @@ import {
writeStoredLocalWorkspaceMode,
} from "#/utils/workspace-mode";
import type { PluginSpec } from "#/api/conversation-service/agent-server-conversation-service.types";
+import { markAutomationSetupHandoff } from "#/api/automation-setup-handoff-store";
import { PluginPickerModal } from "#/components/features/plugins/plugin-picker-modal";
import { PluginPickerTrigger } from "#/components/features/plugins/plugin-picker-trigger";
import { RecommendedAutomationsLauncher } from "#/components/features/automations/recommended-automations-launcher";
@@ -163,10 +164,15 @@ export function HomeChatLauncher() {
// Explicitly-attached plugins are additive on top of any ambient set and
// are resolved from git at run time. Omitted entirely when none selected so
// nothing attaches unless the user picked it.
- if (selectedPlugins.length > 0) {
+ if (!isAutomateMode && selectedPlugins.length > 0) {
variables = { ...variables, plugins: selectedPlugins };
}
+ const openAutomationSetupMode = (conversationId: string) => {
+ if (!isAutomateMode) return;
+ markAutomationSetupHandoff(conversationId);
+ };
+
// Loading toast gives the user a clear signal that the request is in
// flight; dismissed precisely once the mutation resolves.
const toastId = toast.loading(
@@ -218,6 +224,7 @@ export function HomeChatLauncher() {
images: attachmentSnapshot.images,
imagesMarkedUploadAsFile,
});
+ openAutomationSetupMode(targetConversationId);
navigate(`/conversations/${targetConversationId}`);
return;
} else {
@@ -247,6 +254,7 @@ export function HomeChatLauncher() {
});
}
+ openAutomationSetupMode(targetConversationId);
navigate(`/conversations/${targetConversationId}`);
} catch (error) {
toast.dismiss(toastId);
@@ -356,13 +364,11 @@ export function HomeChatLauncher() {
/>
</div>
- {isAutomateMode && (
- <div className="mt-8 flex w-full flex-col gap-8">
- <RecommendedAutomationsLauncher variant="rail" />
- <PinnedAutomationsDashboard />
- <RunningAutomationsList />
- </div>
- )}
+ <div className="mt-8 flex w-full flex-col gap-8">
+ <RecommendedAutomationsLauncher variant="rail" />
+ <PinnedAutomationsDashboard />
+ <RunningAutomationsList />
+ </div>
</div>
{isLocal ? (
diff --git a/src/context/composer-docked-context.tsx b/src/context/composer-docked-context.tsx
new file mode 100644
index 0000000000..b1616b06f0
--- /dev/null
+++ b/src/context/composer-docked-context.tsx
@@ -0,0 +1,31 @@
+import React from "react";
+
+type ComposerDockedContextValue = {
+ enabled: boolean;
+ minimal: boolean;
+};
+
+const ComposerDockedContext = React.createContext<ComposerDockedContextValue>({
+ enabled: false,
+ minimal: false,
+});
+
+export function useComposerDockedMinimal(): boolean {
+ return React.useContext(ComposerDockedContext).minimal;
+}
+
+export function ComposerDockedProvider({
+ enabled,
+ minimal = false,
+ children,
+}: {
+ enabled: boolean;
+ minimal?: boolean;
+ children: React.ReactNode;
+}) {
+ return (
+ <ComposerDockedContext.Provider value={{ enabled, minimal }}>
+ {children}
+ </ComposerDockedContext.Provider>
+ );
+}
diff --git a/src/hooks/query/use-git-repositories.ts b/src/hooks/query/use-git-repositories.ts
index aad07c1f58..79d29281bb 100644
--- a/src/hooks/query/use-git-repositories.ts
+++ b/src/hooks/query/use-git-repositories.ts
@@ -11,6 +11,7 @@ interface UseGitRepositoriesOptions {
provider: Provider | null;
pageSize?: number;
enabled?: boolean;
+ allowMissingProvider?: boolean;
}
type InstallationCursor = { installationIndex: number; pageId: string | null };
@@ -18,7 +19,12 @@ type UserCursor = string | null;
type Cursor = InstallationCursor | UserCursor;
export function useGitRepositories(options: UseGitRepositoriesOptions) {
- const { provider, pageSize = 30, enabled = true } = options;
+ const {
+ provider,
+ pageSize = 30,
+ enabled = true,
+ allowMissingProvider = false,
+ } = options;
const { providers } = useUserProviders();
const { data: page } = useAppInstallations(provider, { enabled });
const installations = page?.items;
@@ -104,7 +110,7 @@ export function useGitRepositories(options: UseGitRepositoriesOptions) {
: null,
enabled:
enabled &&
- (providers || []).length > 0 &&
+ (allowMissingProvider || (providers || []).length > 0) &&
!!provider &&
(!useInstallationRepos ||
(Array.isArray(installations) && installations.length > 0)),
diff --git a/src/hooks/use-prompt-textarea-resize.ts b/src/hooks/use-prompt-textarea-resize.ts
new file mode 100644
index 0000000000..8f2ce3753a
--- /dev/null
+++ b/src/hooks/use-prompt-textarea-resize.ts
@@ -0,0 +1,118 @@
+import type {
+ RefObject,
+ MouseEvent as ReactMouseEvent,
+ TouchEvent as ReactTouchEvent,
+} from "react";
+import { useCallback, useEffect, useRef, useState } from "react";
+
+const DRAG_COMMIT_PX = 2;
+const DEFAULT_MIN_HEIGHT = 120;
+const DEFAULT_MAX_HEIGHT = 400;
+
+interface UsePromptTextareaResizeOptions {
+ minHeight?: number;
+ maxHeight?: number;
+ /** Re-measure overflow when the field value changes without changing the dragged height. */
+ contentKey?: unknown;
+}
+
+function styleHeightPx(element: HTMLElement, fallback: number): number {
+ const height = Number.parseFloat(element.style.height);
+ return Number.isFinite(height) ? height : fallback;
+}
+
+export function usePromptTextareaResize<T extends HTMLElement>(
+ elementRef: RefObject<T | null>,
+ {
+ minHeight = DEFAULT_MIN_HEIGHT,
+ maxHeight = DEFAULT_MAX_HEIGHT,
+ contentKey,
+ }: UsePromptTextareaResizeOptions = {},
+) {
+ const [isGripDragging, setIsGripDragging] = useState(false);
+ const gripRef = useRef<HTMLDivElement | null>(null);
+
+ const applyHeight = useCallback(
+ (height: number) => {
+ const element = elementRef.current;
+ if (!element) return;
+ const nextHeight = Math.max(minHeight, Math.min(maxHeight, height));
+ element.style.height = `${nextHeight}px`;
+ element.style.overflowY =
+ element.scrollHeight > nextHeight ? "auto" : "hidden";
+ },
+ [elementRef, maxHeight, minHeight],
+ );
+
+ useEffect(() => {
+ const element = elementRef.current;
+ if (!element) return;
+ applyHeight(styleHeightPx(element, minHeight));
+ }, [applyHeight, contentKey, elementRef, minHeight]);
+
+ const startDrag = useCallback(
+ (startY: number) => {
+ const element = elementRef.current;
+ if (!element) return;
+
+ const startHeight = styleHeightPx(element, minHeight);
+ let dragCommitted = false;
+
+ const handleDragMove = (moveEvent: MouseEvent | TouchEvent) => {
+ moveEvent.preventDefault();
+
+ const clientY =
+ "touches" in moveEvent && moveEvent.touches.length > 0
+ ? moveEvent.touches[0].clientY
+ : (moveEvent as MouseEvent).clientY;
+
+ if (!dragCommitted) {
+ if (Math.abs(clientY - startY) < DRAG_COMMIT_PX) return;
+ dragCommitted = true;
+ setIsGripDragging(true);
+ }
+
+ applyHeight(startHeight + (clientY - startY));
+ };
+
+ const handleDragEnd = () => {
+ document.removeEventListener("mousemove", handleDragMove);
+ document.removeEventListener("mouseup", handleDragEnd);
+ document.removeEventListener("touchmove", handleDragMove);
+ document.removeEventListener("touchend", handleDragEnd);
+ setIsGripDragging(false);
+ };
+
+ document.addEventListener("mousemove", handleDragMove);
+ document.addEventListener("mouseup", handleDragEnd);
+ document.addEventListener("touchmove", handleDragMove, {
+ passive: false,
+ });
+ document.addEventListener("touchend", handleDragEnd);
+ },
+ [applyHeight, elementRef, minHeight],
+ );
+
+ const handleGripMouseDown = useCallback(
+ (event: ReactMouseEvent) => {
+ event.preventDefault();
+ startDrag(event.clientY);
+ },
+ [startDrag],
+ );
+
+ const handleGripTouchStart = useCallback(
+ (event: ReactTouchEvent) => {
+ event.preventDefault();
+ startDrag(event.touches[0].clientY);
+ },
+ [startDrag],
+ );
+
+ return {
+ gripRef,
+ isGripDragging,
+ handleGripMouseDown,
+ handleGripTouchStart,
+ };
+}
diff --git a/src/i18n/translation.json b/src/i18n/translation.json
index f04f16a856..b22984b6be 100644
--- a/src/i18n/translation.json
+++ b/src/i18n/translation.json
@@ -45456,5 +45456,1042 @@
"de": "Diese Adresse passt zu keiner Seite. Prüfe die URL oder kehre zur Startseite zurück.",
"uk": "Ця адреса не відповідає жодній сторінці. Перевірте URL або поверніться на головну сторінку.",
"ca": "Aquesta adreça no correspon a cap pàgina. Comprova l'URL o torna a la pàgina d'inici."
+ },
+ "SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION": {
+ "en": "Enable sub-agent delegation via TaskToolSet.",
+ "ja": "TaskToolSet を介したサブエージェントへの委任を有効にします。",
+ "zh-CN": "通过 TaskToolSet 启用子智能体委派。",
+ "zh-TW": "透過 TaskToolSet 啟用子智能體委派。",
+ "ko-KR": "TaskToolSet을 통한 하위 에이전트 위임을 활성화합니다.",
+ "no": "Aktiver delegering til underagenter via TaskToolSet.",
+ "it": "Abilita la delega ai sottoagenti tramite TaskToolSet.",
+ "pt": "Ative a delegação para subagentes via TaskToolSet.",
+ "es": "Habilita la delegación a subagentes mediante TaskToolSet.",
+ "ar": "مكّن تفويض المهام إلى الوكلاء الفرعيين عبر TaskToolSet.",
+ "fr": "Activez la délégation aux sous-agents via TaskToolSet.",
+ "tr": "TaskToolSet aracılığıyla alt ajanlara yetki devrini etkinleştirin.",
+ "de": "Aktivieren Sie die Delegierung an Sub-Agenten über TaskToolSet.",
+ "uk": "Увімкніть делегування субагентам через TaskToolSet.",
+ "ca": "Activa la delegació a subagents mitjançant TaskToolSet."
+ },
+ "SCHEMA$ENABLE_SUB_AGENTS$LABEL": {
+ "en": "Enable sub-agents",
+ "ja": "サブエージェントを有効にする",
+ "zh-CN": "启用子智能体",
+ "zh-TW": "啟用子智能體",
+ "ko-KR": "하위 에이전트 활성화",
+ "no": "Aktiver underagenter",
+ "it": "Abilita sottoagenti",
+ "pt": "Ativar subagentes",
+ "es": "Habilitar subagentes",
+ "ar": "تمكين الوكلاء الفرعيين",
+ "fr": "Activer les sous-agents",
+ "tr": "Alt ajanları etkinleştir",
+ "de": "Sub-Agenten aktivieren",
+ "uk": "Увімкнути субагентів",
+ "ca": "Activa subagents"
+ },
+ "SCHEMA$ENABLE_SWITCH_LLM_TOOL$DESCRIPTION": {
+ "en": "Allow the agent to move this conversation to another saved LLM profile on its own. Disable to remove that tool.",
+ "ja": "エージェントがこの会話を別の保存済み LLM プロファイルへ自動的に移すことを許可します。無効にするとそのツールが削除されます。",
+ "zh-CN": "允许智能体自行将当前对话切换到另一个已保存的 LLM 配置。禁用后将移除该工具。",
+ "zh-TW": "允許代理自行將目前對話切換到另一個已儲存的 LLM 設定檔。停用後將移除該工具。",
+ "ko-KR": "에이전트가 이 대화를 다른 저장된 LLM 프로필로 스스로 전환하는 것을 허용합니다. 비활성화하면 해당 도구가 제거됩니다.",
+ "no": "La agenten flytte denne samtalen til en annen lagret LLM-profil på egen hånd. Deaktiver for å fjerne verktøyet.",
+ "it": "Consenti all'agente di spostare autonomamente questa conversazione su un altro profilo LLM salvato. Disattiva per rimuovere lo strumento.",
+ "pt": "Permite que o agente mova esta conversa para outro perfil de LLM salvo por conta própria. Desative para remover essa ferramenta.",
+ "es": "Permite que el agente traslade esta conversación a otro perfil de LLM guardado por su cuenta. Desactívalo para eliminar esa herramienta.",
+ "ar": "السماح للوكيل بنقل هذه المحادثة إلى ملف LLM شخصي آخر محفوظ من تلقاء نفسه. عطّل هذا الخيار لإزالة تلك الأداة.",
+ "fr": "Permettre à l'agent de transférer lui-même cette conversation vers un autre profil LLM enregistré. Désactivez pour retirer cet outil.",
+ "tr": "Aracının bu konuşmayı kendi kendine kayıtlı başka bir LLM profiline taşımasına izin ver. Bu aracı kaldırmak için devre dışı bırak.",
+ "de": "Erlauben Sie dem Agenten, diese Unterhaltung selbstständig auf ein anderes gespeichertes LLM-Profil zu übertragen. Deaktivieren, um das Werkzeug zu entfernen.",
+ "uk": "Дозволити агенту самостійно переносити цю розмову до іншого збереженого профілю LLM. Вимкніть, щоб прибрати цей інструмент.",
+ "ca": "Permet que l'agent mogui aquesta conversa a un altre perfil d'LLM desat per si mateix. Desactiva-ho per eliminar aquesta eina."
+ },
+ "SCHEMA$ENABLE_SWITCH_LLM_TOOL$LABEL": {
+ "en": "Let the agent switch LLM profiles",
+ "ja": "エージェントによる LLM プロファイルの切り替えを許可する",
+ "zh-CN": "允许智能体切换 LLM 配置",
+ "zh-TW": "允許代理切換 LLM 設定檔",
+ "ko-KR": "에이전트가 LLM 프로필을 전환하도록 허용",
+ "no": "La agenten bytte LLM-profil",
+ "it": "Consenti all'agente di cambiare profilo LLM",
+ "pt": "Permitir que o agente alterne perfis de LLM",
+ "es": "Permitir que el agente cambie de perfil de LLM",
+ "ar": "السماح للوكيل بتبديل ملفات LLM الشخصية",
+ "fr": "Permettre à l'agent de changer de profil LLM",
+ "tr": "Aracının LLM profilleri arasında geçiş yapmasına izin ver",
+ "de": "Agenten das Wechseln von LLM-Profilen erlauben",
+ "uk": "Дозволити агенту перемикати профілі LLM",
+ "ca": "Permet que l'agent canvii de perfil d'LLM"
+ },
+ "LAUNCH$TRUST_SKILL_CHECKBOX": {
+ "en": "I trust this skill from {{sources}} with the agent secrets defined in my account.",
+ "ja": "私は{{sources}}からのこのスキルを、アカウントに定義されたエージェントシークレットとともに信頼します。",
+ "zh-CN": "我信任来自 {{sources}} 的此技能,并允许其使用我账户中定义的代理密钥。",
+ "zh-TW": "我信任來自 {{sources}} 的此技能,並允許其使用我帳戶中定義的代理密鑰。",
+ "ko-KR": "{{sources}}의 이 스킬을 내 계정에 정의된 에이전트 비밀과 함께 신뢰합니다.",
+ "no": "Jeg stoler på denne ferdigheten fra {{sources}} med agenthemmelighetene definert i kontoen min.",
+ "it": "Mi fido di questa skill da {{sources}} con i segreti dell'agente definiti nel mio account.",
+ "pt": "Eu confio nesta habilidade de {{sources}} com os segredos do agente definidos em minha conta.",
+ "es": "Confío en esta habilidad de {{sources}} con los secretos del agente definidos en mi cuenta.",
+ "ar": "أثق في هذه المهارة من {{sources}} مع أسرار الوكيل المحددة في حسابي.",
+ "fr": "Je fais confiance à cette compétence de {{sources}} avec les secrets d'agent définis dans mon compte.",
+ "tr": "{{sources}} kaynağından gelen bu beceriye hesabımda tanımlı ajan sırlarıyla güveniyorum.",
+ "de": "Ich vertraue dieser Fähigkeit von {{sources}} mit den in meinem Konto definierten Agenten-Geheimnissen.",
+ "uk": "Я довіряю цій навичці з {{sources}} із секретами агента, визначеними в моєму обліковому записі.",
+ "ca": "Confio en aquesta habilitat de {{sources}} amb els secrets de l'agent definits al meu compte."
+ },
+ "CONVERSATION$NO_BUDGET_LIMIT": {
+ "en": "No budget limit",
+ "ja": "予算制限なし",
+ "zh-CN": "无预算限制",
+ "zh-TW": "無預算限制",
+ "ko-KR": "예산 제한 없음",
+ "de": "Kein Budgetlimit",
+ "no": "Ingen budsjettgrense",
+ "it": "Nessun limite di budget",
+ "pt": "Sem limite de orçamento",
+ "es": "Sin límite de presupuesto",
+ "ar": "لا حد للميزانية",
+ "fr": "Pas de limite de budget",
+ "tr": "Bütçe limiti yok",
+ "uk": "Без обмеження бюджету",
+ "ca": "Sense límit de pressupost"
+ },
+ "AUTOMATIONS$GIT_SYNC$ENABLE_BLOCKED_ERROR": {
+ "en": "Git Sync must be enabled in the automation backend's environment, and the service restarted, before it can be turned on here.",
+ "ja": "Git 同期を有効にするには、オートメーションバックエンドの環境で有効化し、サービスを再起動する必要があります。",
+ "zh-CN": "必须先在自动化后端的环境中启用 Git 同步并重启服务,才能在此处开启。",
+ "zh-TW": "必須先在自動化後端的環境中啟用 Git 同步並重新啟動服務,才能在此處開啟。",
+ "ko-KR": "여기서 켜려면 먼저 자동화 백엔드 환경에서 Git 동기화를 활성화하고 서비스를 다시 시작해야 합니다.",
+ "no": "Git-synkronisering må aktiveres i automatiserings-backendens miljø, og tjenesten må startes på nytt, før den kan slås på her.",
+ "ar": "يجب تفعيل مزامنة Git في بيئة الخدمة الخلفية للأتمتة وإعادة تشغيل الخدمة قبل تفعيلها هنا.",
+ "de": "Die Git-Synchronisierung muss in der Umgebung des Automatisierungs-Backends aktiviert und der Dienst neu gestartet werden, bevor sie hier eingeschaltet werden kann.",
+ "fr": "La synchronisation Git doit être activée dans l'environnement du backend d'automatisation et le service redémarré avant de pouvoir l'activer ici.",
+ "it": "La sincronizzazione Git deve essere abilitata nell'ambiente del backend di automazione e il servizio riavviato prima di poterla attivare qui.",
+ "pt": "A sincronização do Git precisa ser ativada no ambiente do backend de automação, e o serviço reiniciado, antes de poder ser ligada aqui.",
+ "es": "La sincronización de Git debe habilitarse en el entorno del backend de automatización y reiniciar el servicio antes de poder activarla aquí.",
+ "ca": "La sincronització de Git s'ha d'habilitar a l'entorn del backend d'automatització i cal reiniciar el servei abans de poder activar-la aquí.",
+ "tr": "Git eşitlemesi burada açılabilmesi için önce otomasyon arka ucunun ortamında etkinleştirilmeli ve hizmet yeniden başlatılmalıdır.",
+ "uk": "Щоб увімкнути синхронізацію Git тут, її потрібно спершу активувати в середовищі бекенда автоматизації та перезапустити службу."
+ },
+ "AUTOMATIONS$GIT_SYNC$NOT_LOCAL_TITLE": {
+ "en": "Git Sync isn't available",
+ "ja": "Git同期は利用できません",
+ "zh-CN": "Git 同步不可用",
+ "zh-TW": "Git 同步無法使用",
+ "ko-KR": "Git 동기화를 사용할 수 없습니다",
+ "no": "Git-synkronisering er ikke tilgjengelig",
+ "ar": "مزامنة Git غير متاحة",
+ "de": "Git-Synchronisierung ist nicht verfügbar",
+ "fr": "La synchronisation Git n'est pas disponible",
+ "it": "La sincronizzazione Git non è disponibile",
+ "pt": "A sincronização Git não está disponível",
+ "es": "La sincronización de Git no está disponible",
+ "ca": "La sincronització de Git no està disponible",
+ "tr": "Git Senkronizasyonu kullanılamıyor",
+ "uk": "Git-синхронізація недоступна"
+ },
+ "AUTOMATIONS$GIT_SYNC$NOT_LOCAL_MESSAGE": {
+ "en": "Git Sync is only available when connected to a local OpenHands backend.",
+ "ja": "Git同期はローカルのOpenHandsバックエンドに接続している場合のみ利用できます。",
+ "zh-CN": "只有连接到本地 OpenHands 后端时才能使用 Git 同步。",
+ "zh-TW": "只有連線到本機 OpenHands 後端時才能使用 Git 同步。",
+ "ko-KR": "Git 동기화는 로컬 OpenHands 백엔드에 연결된 경우에만 사용할 수 있습니다.",
+ "no": "Git-synkronisering er kun tilgjengelig når du er koblet til en lokal OpenHands-backend.",
+ "ar": "تتوفر مزامنة Git فقط عند الاتصال بخلفية OpenHands محلية.",
+ "de": "Git-Synchronisierung ist nur verfügbar, wenn eine Verbindung zu einem lokalen OpenHands-Backend besteht.",
+ "fr": "La synchronisation Git n'est disponible que lorsque vous êtes connecté à un backend OpenHands local.",
+ "it": "La sincronizzazione Git è disponibile solo quando sei connesso a un backend OpenHands locale.",
+ "pt": "A sincronização Git só está disponível quando conectado a um backend OpenHands local.",
+ "es": "La sincronización de Git solo está disponible al conectarse a un backend local de OpenHands.",
+ "ca": "La sincronització de Git només està disponible en connectar-se a un backend local d'OpenHands.",
+ "tr": "Git Senkronizasyonu yalnızca yerel bir OpenHands arka ucuna bağlıyken kullanılabilir.",
+ "uk": "Git-синхронізація доступна лише при підключенні до локального бекенду OpenHands."
+ },
+ "AUTOMATION_SETUP$TITLE": {
+ "ar": "Automation setup",
+ "ca": "Automation setup",
+ "de": "Automatisierung einrichten",
+ "en": "Automation setup",
+ "es": "Configuración de automatización",
+ "fr": "Configuration de l’automatisation",
+ "it": "Automation setup",
+ "ja": "自動化の設定",
+ "ko-KR": "Automation setup",
+ "no": "Automation setup",
+ "pt": "Automation setup",
+ "tr": "Automation setup",
+ "uk": "Automation setup",
+ "zh-CN": "Automation setup",
+ "zh-TW": "Automation setup"
+ },
+ "AUTOMATION_SETUP$BACK_LABEL": {
+ "ar": "Close automation setup",
+ "ca": "Close automation setup",
+ "de": "Automatisierungseinrichtung schließen",
+ "en": "Close automation setup",
+ "es": "Cerrar configuración de automatización",
+ "fr": "Fermer la configuration de l’automatisation",
+ "it": "Close automation setup",
+ "ja": "自動化の設定を閉じる",
+ "ko-KR": "Close automation setup",
+ "no": "Close automation setup",
+ "pt": "Close automation setup",
+ "tr": "Close automation setup",
+ "uk": "Close automation setup",
+ "zh-CN": "Close automation setup",
+ "zh-TW": "Close automation setup"
+ },
+ "AUTOMATION_SETUP$SAVE_DRAFT": {
+ "ar": "Save draft",
+ "ca": "Save draft",
+ "de": "Entwurf speichern",
+ "en": "Save draft",
+ "es": "Guardar borrador",
+ "fr": "Enregistrer le brouillon",
+ "it": "Save draft",
+ "ja": "下書きを保存",
+ "ko-KR": "Save draft",
+ "no": "Save draft",
+ "pt": "Save draft",
+ "tr": "Save draft",
+ "uk": "Save draft",
+ "zh-CN": "Save draft",
+ "zh-TW": "Save draft"
+ },
+ "AUTOMATION_SETUP$TEST": {
+ "ar": "Test",
+ "ca": "Test",
+ "de": "Testen",
+ "en": "Test",
+ "es": "Probar",
+ "fr": "Tester",
+ "it": "Test",
+ "ja": "テスト",
+ "ko-KR": "Test",
+ "no": "Test",
+ "pt": "Test",
+ "tr": "Test",
+ "uk": "Test",
+ "zh-CN": "Test",
+ "zh-TW": "Test"
+ },
+ "AUTOMATION_SETUP$TYPE_LABEL": {
+ "ar": "Automation type",
+ "ca": "Automation type",
+ "de": "Automatisierungstyp",
+ "en": "Automation type",
+ "es": "Tipo de automatización",
+ "fr": "Type d’automatisation",
+ "it": "Automation type",
+ "ja": "自動化タイプ",
+ "ko-KR": "Automation type",
+ "no": "Automation type",
+ "pt": "Automation type",
+ "tr": "Automation type",
+ "uk": "Automation type",
+ "zh-CN": "Automation type",
+ "zh-TW": "Automation type"
+ },
+ "AUTOMATION_SETUP$TYPE_PROMPT": {
+ "ar": "Prompt",
+ "ca": "Prompt",
+ "de": "Prompt",
+ "en": "Prompt",
+ "es": "Prompt",
+ "fr": "Prompt",
+ "it": "Prompt",
+ "ja": "プロンプト",
+ "ko-KR": "Prompt",
+ "no": "Prompt",
+ "pt": "Prompt",
+ "tr": "Prompt",
+ "uk": "Prompt",
+ "zh-CN": "Prompt",
+ "zh-TW": "Prompt"
+ },
+ "AUTOMATION_SETUP$TYPE_PLUGIN": {
+ "ar": "Plugin",
+ "ca": "Plugin",
+ "de": "Plugin",
+ "en": "Plugin",
+ "es": "Plugin",
+ "fr": "Plugin",
+ "it": "Plugin",
+ "ja": "プラグイン",
+ "ko-KR": "Plugin",
+ "no": "Plugin",
+ "pt": "Plugin",
+ "tr": "Plugin",
+ "uk": "Plugin",
+ "zh-CN": "Plugin",
+ "zh-TW": "Plugin"
+ },
+ "AUTOMATION_SETUP$TYPE_CUSTOM": {
+ "ar": "Custom",
+ "ca": "Custom",
+ "de": "Benutzerdefiniert",
+ "en": "Custom",
+ "es": "Personalizado",
+ "fr": "Personnalisé",
+ "it": "Custom",
+ "ja": "カスタム",
+ "ko-KR": "Custom",
+ "no": "Custom",
+ "pt": "Custom",
+ "tr": "Custom",
+ "uk": "Custom",
+ "zh-CN": "Custom",
+ "zh-TW": "Custom"
+ },
+ "AUTOMATION_SETUP$NAME_PLACEHOLDER": {
+ "ar": "Standup digest",
+ "ca": "Standup digest",
+ "de": "Standup-Zusammenfassung",
+ "en": "Standup digest",
+ "es": "Resumen de standup",
+ "fr": "Résumé de stand-up",
+ "it": "Standup digest",
+ "ja": "スタンドアップ要約",
+ "ko-KR": "Standup digest",
+ "no": "Standup digest",
+ "pt": "Standup digest",
+ "tr": "Standup digest",
+ "uk": "Standup digest",
+ "zh-CN": "Standup digest",
+ "zh-TW": "Standup digest"
+ },
+ "AUTOMATION_SETUP$MODEL_PLACEHOLDER": {
+ "ar": "Current LLM settings",
+ "ca": "Current LLM settings",
+ "de": "Current LLM settings",
+ "en": "Current LLM settings",
+ "es": "Current LLM settings",
+ "fr": "Current LLM settings",
+ "it": "Current LLM settings",
+ "ja": "Current LLM settings",
+ "ko-KR": "Current LLM settings",
+ "no": "Current LLM settings",
+ "pt": "Current LLM settings",
+ "tr": "Current LLM settings",
+ "uk": "Current LLM settings",
+ "zh-CN": "Current LLM settings",
+ "zh-TW": "Current LLM settings"
+ },
+ "AUTOMATION_SETUP$PROMPT_HINT": {
+ "ar": "Prompt preset",
+ "ca": "Prompt preset",
+ "de": "Prompt-Voreinstellung",
+ "en": "Prompt preset",
+ "es": "Preajuste de prompt",
+ "fr": "Préréglage de prompt",
+ "it": "Prompt preset",
+ "ja": "プロンプトプリセット",
+ "ko-KR": "Prompt preset",
+ "no": "Prompt preset",
+ "pt": "Prompt preset",
+ "tr": "Prompt preset",
+ "uk": "Prompt preset",
+ "zh-CN": "Prompt preset",
+ "zh-TW": "Prompt preset"
+ },
+ "AUTOMATION_SETUP$PYTHON_CODE": {
+ "ar": "Python code",
+ "ca": "Python code",
+ "de": "Python-Code",
+ "en": "Python code",
+ "es": "Código Python",
+ "fr": "Code Python",
+ "it": "Python code",
+ "ja": "Python コード",
+ "ko-KR": "Python code",
+ "no": "Python code",
+ "pt": "Python code",
+ "tr": "Python code",
+ "uk": "Python code",
+ "zh-CN": "Python code",
+ "zh-TW": "Python code"
+ },
+ "AUTOMATION_SETUP$RENDERED_CODE": {
+ "ar": "Rendered Python code",
+ "ca": "Rendered Python code",
+ "de": "Gerenderter Python-Code",
+ "en": "Rendered Python code",
+ "es": "Código Python renderizado",
+ "fr": "Code Python rendu",
+ "it": "Rendered Python code",
+ "ja": "レンダリングされた Python コード",
+ "ko-KR": "Rendered Python code",
+ "no": "Rendered Python code",
+ "pt": "Rendered Python code",
+ "tr": "Rendered Python code",
+ "uk": "Rendered Python code",
+ "zh-CN": "Rendered Python code",
+ "zh-TW": "Rendered Python code"
+ },
+ "AUTOMATION_SETUP$PLUGIN_SOURCE": {
+ "ar": "Plugin source",
+ "ca": "Plugin source",
+ "de": "Plugin-Quelle",
+ "en": "Plugin source",
+ "es": "Origen del plugin",
+ "fr": "Source du plugin",
+ "it": "Plugin source",
+ "ja": "プラグインソース",
+ "ko-KR": "Plugin source",
+ "no": "Plugin source",
+ "pt": "Plugin source",
+ "tr": "Plugin source",
+ "uk": "Plugin source",
+ "zh-CN": "Plugin source",
+ "zh-TW": "Plugin source"
+ },
+ "AUTOMATION_SETUP$PLUGIN_SOURCE_PLACEHOLDER": {
+ "ar": "github:owner/plugin",
+ "ca": "github:owner/plugin",
+ "de": "github:owner/plugin",
+ "en": "github:owner/plugin",
+ "es": "github:owner/plugin",
+ "fr": "github:owner/plugin",
+ "it": "github:owner/plugin",
+ "ja": "github:owner/plugin",
+ "ko-KR": "github:owner/plugin",
+ "no": "github:owner/plugin",
+ "pt": "github:owner/plugin",
+ "tr": "github:owner/plugin",
+ "uk": "github:owner/plugin",
+ "zh-CN": "github:owner/plugin",
+ "zh-TW": "github:owner/plugin"
+ },
+ "AUTOMATION_SETUP$PLUGIN_REF": {
+ "ar": "Plugin ref",
+ "ca": "Plugin ref",
+ "de": "Plugin-Ref",
+ "en": "Plugin ref",
+ "es": "Referencia del plugin",
+ "fr": "Référence du plugin",
+ "it": "Plugin ref",
+ "ja": "プラグイン参照",
+ "ko-KR": "Plugin ref",
+ "no": "Plugin ref",
+ "pt": "Plugin ref",
+ "tr": "Plugin ref",
+ "uk": "Plugin ref",
+ "zh-CN": "Plugin ref",
+ "zh-TW": "Plugin ref"
+ },
+ "AUTOMATION_SETUP$PLUGIN_REF_PLACEHOLDER": {
+ "ar": "main",
+ "ca": "main",
+ "de": "main",
+ "en": "main",
+ "es": "main",
+ "fr": "main",
+ "it": "main",
+ "ja": "main",
+ "ko-KR": "main",
+ "no": "main",
+ "pt": "main",
+ "tr": "main",
+ "uk": "main",
+ "zh-CN": "main",
+ "zh-TW": "main"
+ },
+ "AUTOMATION_SETUP$SCHEDULE": {
+ "ar": "Schedule",
+ "ca": "Schedule",
+ "de": "Zeitplan",
+ "en": "Schedule",
+ "es": "Programación",
+ "fr": "Planification",
+ "it": "Schedule",
+ "ja": "スケジュール",
+ "ko-KR": "Schedule",
+ "no": "Schedule",
+ "pt": "Schedule",
+ "tr": "Schedule",
+ "uk": "Schedule",
+ "zh-CN": "Schedule",
+ "zh-TW": "Schedule"
+ },
+ "AUTOMATION_SETUP$SCHEDULE_DESCRIPTION": {
+ "ar": "Run on an interval or at a set time",
+ "ca": "Run on an interval or at a set time",
+ "de": "In einem Intervall oder zu einer festen Zeit ausführen",
+ "en": "Run on an interval or at a set time",
+ "es": "Ejecutar en un intervalo o a una hora definida",
+ "fr": "Exécuter à intervalle régulier ou à une heure définie",
+ "it": "Run on an interval or at a set time",
+ "ja": "一定間隔または指定時刻に実行",
+ "ko-KR": "Run on an interval or at a set time",
+ "no": "Run on an interval or at a set time",
+ "pt": "Run on an interval or at a set time",
+ "tr": "Run on an interval or at a set time",
+ "uk": "Run on an interval or at a set time",
+ "zh-CN": "Run on an interval or at a set time",
+ "zh-TW": "Run on an interval or at a set time"
+ },
+ "AUTOMATION_SETUP$EVENT_DESCRIPTION": {
+ "ar": "Run when GitHub, Slack, or Linear fires",
+ "ca": "Run when GitHub, Slack, or Linear fires",
+ "de": "Ausführen, wenn GitHub, Slack oder Linear auslöst",
+ "en": "Run when GitHub, Slack, or Linear fires",
+ "es": "Ejecutar cuando GitHub, Slack o Linear disparen un evento",
+ "fr": "Exécuter quand GitHub, Slack ou Linear déclenche un événement",
+ "it": "Run when GitHub, Slack, or Linear fires",
+ "ja": "GitHub、Slack、Linear のイベントで実行",
+ "ko-KR": "Run when GitHub, Slack, or Linear fires",
+ "no": "Run when GitHub, Slack, or Linear fires",
+ "pt": "Run when GitHub, Slack, or Linear fires",
+ "tr": "Run when GitHub, Slack, or Linear fires",
+ "uk": "Run when GitHub, Slack, or Linear fires",
+ "zh-CN": "Run when GitHub, Slack, or Linear fires",
+ "zh-TW": "Run when GitHub, Slack, or Linear fires"
+ },
+ "AUTOMATION_SETUP$FREQUENCY": {
+ "ar": "Frequency",
+ "ca": "Frequency",
+ "de": "Häufigkeit",
+ "en": "Frequency",
+ "es": "Frecuencia",
+ "fr": "Fréquence",
+ "it": "Frequency",
+ "ja": "頻度",
+ "ko-KR": "Frequency",
+ "no": "Frequency",
+ "pt": "Frequency",
+ "tr": "Frequency",
+ "uk": "Frequency",
+ "zh-CN": "Frequency",
+ "zh-TW": "Frequency"
+ },
+ "AUTOMATION_SETUP$FREQUENCY_ONCE": {
+ "ar": "Once",
+ "ca": "Once",
+ "de": "Einmal",
+ "en": "Once",
+ "es": "Una vez",
+ "fr": "Une fois",
+ "it": "Once",
+ "ja": "1回",
+ "ko-KR": "Once",
+ "no": "Once",
+ "pt": "Once",
+ "tr": "Once",
+ "uk": "Once",
+ "zh-CN": "Once",
+ "zh-TW": "Once"
+ },
+ "AUTOMATION_SETUP$FREQUENCY_HOURLY": {
+ "ar": "Hourly",
+ "ca": "Hourly",
+ "de": "Stündlich",
+ "en": "Hourly",
+ "es": "Cada hora",
+ "fr": "Toutes les heures",
+ "it": "Hourly",
+ "ja": "毎時",
+ "ko-KR": "Hourly",
+ "no": "Hourly",
+ "pt": "Hourly",
+ "tr": "Hourly",
+ "uk": "Hourly",
+ "zh-CN": "Hourly",
+ "zh-TW": "Hourly"
+ },
+ "AUTOMATION_SETUP$FREQUENCY_WEEKDAYS": {
+ "ar": "Weekdays (Mon–Fri)",
+ "ca": "Weekdays (Mon–Fri)",
+ "de": "Wochentage (Mo–Fr)",
+ "en": "Weekdays (Mon–Fri)",
+ "es": "Días laborables (lun–vie)",
+ "fr": "Jours ouvrés (lun.–ven.)",
+ "it": "Weekdays (Mon–Fri)",
+ "ja": "平日(月〜金)",
+ "ko-KR": "Weekdays (Mon–Fri)",
+ "no": "Weekdays (Mon–Fri)",
+ "pt": "Weekdays (Mon–Fri)",
+ "tr": "Weekdays (Mon–Fri)",
+ "uk": "Weekdays (Mon–Fri)",
+ "zh-CN": "Weekdays (Mon–Fri)",
+ "zh-TW": "Weekdays (Mon–Fri)"
+ },
+ "AUTOMATION_SETUP$FREQUENCY_WEEKLY": {
+ "ar": "Weekly",
+ "ca": "Weekly",
+ "de": "Wöchentlich",
+ "en": "Weekly",
+ "es": "Semanal",
+ "fr": "Hebdomadaire",
+ "it": "Weekly",
+ "ja": "毎週",
+ "ko-KR": "Weekly",
+ "no": "Weekly",
+ "pt": "Weekly",
+ "tr": "Weekly",
+ "uk": "Weekly",
+ "zh-CN": "Weekly",
+ "zh-TW": "Weekly"
+ },
+ "AUTOMATION_SETUP$AT": {
+ "ar": "At",
+ "ca": "At",
+ "de": "Um",
+ "en": "At",
+ "es": "A las",
+ "fr": "À",
+ "it": "At",
+ "ja": "時刻",
+ "ko-KR": "At",
+ "no": "At",
+ "pt": "At",
+ "tr": "At",
+ "uk": "At",
+ "zh-CN": "At",
+ "zh-TW": "At"
+ },
+ "AUTOMATION_SETUP$EVENT_SOURCE": {
+ "ar": "Event source",
+ "ca": "Event source",
+ "de": "Ereignisquelle",
+ "en": "Event source",
+ "es": "Origen del evento",
+ "fr": "Source de l’événement",
+ "it": "Event source",
+ "ja": "イベントソース",
+ "ko-KR": "Event source",
+ "no": "Event source",
+ "pt": "Event source",
+ "tr": "Event source",
+ "uk": "Event source",
+ "zh-CN": "Event source",
+ "zh-TW": "Event source"
+ },
+ "AUTOMATION_SETUP$EVENT_KEY": {
+ "ar": "Event key",
+ "ca": "Event key",
+ "de": "Ereignisschlüssel",
+ "en": "Event key",
+ "es": "Clave del evento",
+ "fr": "Clé de l’événement",
+ "it": "Event key",
+ "ja": "イベントキー",
+ "ko-KR": "Event key",
+ "no": "Event key",
+ "pt": "Event key",
+ "tr": "Event key",
+ "uk": "Event key",
+ "zh-CN": "Event key",
+ "zh-TW": "Event key"
+ },
+ "AUTOMATION_SETUP$EVENT_FILTER": {
+ "ar": "Event filter",
+ "ca": "Event filter",
+ "de": "Ereignisfilter",
+ "en": "Event filter",
+ "es": "Filtro de evento",
+ "fr": "Filtre d’événement",
+ "it": "Event filter",
+ "ja": "イベントフィルター",
+ "ko-KR": "Event filter",
+ "no": "Event filter",
+ "pt": "Event filter",
+ "tr": "Event filter",
+ "uk": "Event filter",
+ "zh-CN": "Event filter",
+ "zh-TW": "Event filter"
+ },
+ "AUTOMATION_SETUP$ADDITIONAL_OPTIONS": {
+ "ar": "Additional options",
+ "ca": "Additional options",
+ "de": "Weitere Optionen",
+ "en": "Additional options",
+ "es": "Opciones adicionales",
+ "fr": "Options supplémentaires",
+ "it": "Additional options",
+ "ja": "追加オプション",
+ "ko-KR": "Additional options",
+ "no": "Additional options",
+ "pt": "Additional options",
+ "tr": "Additional options",
+ "uk": "Additional options",
+ "zh-CN": "Additional options",
+ "zh-TW": "Additional options"
+ },
+ "AUTOMATION_SETUP$ADD_TIMEOUT": {
+ "ar": "Add Timeout",
+ "ca": "Add Timeout",
+ "de": "Timeout hinzufügen",
+ "en": "Add Timeout",
+ "es": "Añadir tiempo de espera",
+ "fr": "Ajouter un délai d’expiration",
+ "it": "Add Timeout",
+ "ja": "タイムアウトを追加",
+ "ko-KR": "Add Timeout",
+ "no": "Add Timeout",
+ "pt": "Add Timeout",
+ "tr": "Add Timeout",
+ "uk": "Add Timeout",
+ "zh-CN": "Add Timeout",
+ "zh-TW": "Add Timeout"
+ },
+ "AUTOMATION_SETUP$TIMEOUT_SECONDS": {
+ "ar": "Timeout seconds",
+ "ca": "Timeout seconds",
+ "de": "Timeout in Sekunden",
+ "en": "Timeout seconds",
+ "es": "Segundos de espera",
+ "fr": "Délai en secondes",
+ "it": "Timeout seconds",
+ "ja": "タイムアウト秒数",
+ "ko-KR": "Timeout seconds",
+ "no": "Timeout seconds",
+ "pt": "Timeout seconds",
+ "tr": "Timeout seconds",
+ "uk": "Timeout seconds",
+ "zh-CN": "Timeout seconds",
+ "zh-TW": "Timeout seconds"
+ },
+ "AUTOMATION_SETUP$PROMPT_REQUIRED": {
+ "ar": "Add a prompt before continuing.",
+ "ca": "Add a prompt before continuing.",
+ "de": "Fügen Sie vor dem Fortfahren einen Prompt hinzu.",
+ "en": "Add a prompt before continuing.",
+ "es": "Añade un prompt antes de continuar.",
+ "fr": "Ajoutez un prompt avant de continuer.",
+ "it": "Add a prompt before continuing.",
+ "ja": "続行する前にプロンプトを追加してください。",
+ "ko-KR": "Add a prompt before continuing.",
+ "no": "Add a prompt before continuing.",
+ "pt": "Add a prompt before continuing.",
+ "tr": "Add a prompt before continuing.",
+ "uk": "Add a prompt before continuing.",
+ "zh-CN": "Add a prompt before continuing.",
+ "zh-TW": "Add a prompt before continuing."
+ },
+ "AUTOMATION_SETUP$PLUGIN_REQUIRED": {
+ "ar": "Add a plugin source before continuing.",
+ "ca": "Add a plugin source before continuing.",
+ "de": "Fügen Sie vor dem Fortfahren eine Plugin-Quelle hinzu.",
+ "en": "Add a plugin source before continuing.",
+ "es": "Añade un origen de plugin antes de continuar.",
+ "fr": "Ajoutez une source de plugin avant de continuer.",
+ "it": "Add a plugin source before continuing.",
+ "ja": "続行する前にプラグインソースを追加してください。",
+ "ko-KR": "Add a plugin source before continuing.",
+ "no": "Add a plugin source before continuing.",
+ "pt": "Add a plugin source before continuing.",
+ "tr": "Add a plugin source before continuing.",
+ "uk": "Add a plugin source before continuing.",
+ "zh-CN": "Add a plugin source before continuing.",
+ "zh-TW": "Add a plugin source before continuing."
+ },
+ "AUTOMATION_SETUP$CODE_REQUIRED": {
+ "ar": "Add Python code before continuing.",
+ "ca": "Add Python code before continuing.",
+ "de": "Fügen Sie vor dem Fortfahren Python-Code hinzu.",
+ "en": "Add Python code before continuing.",
+ "es": "Añade código Python antes de continuar.",
+ "fr": "Ajoutez du code Python avant de continuer.",
+ "it": "Add Python code before continuing.",
+ "ja": "続行する前に Python コードを追加してください。",
+ "ko-KR": "Add Python code before continuing.",
+ "no": "Add Python code before continuing.",
+ "pt": "Add Python code before continuing.",
+ "tr": "Add Python code before continuing.",
+ "uk": "Add Python code before continuing.",
+ "zh-CN": "Add Python code before continuing.",
+ "zh-TW": "Add Python code before continuing."
+ },
+ "AUTOMATION_SETUP$DRAFT_SAVED": {
+ "ar": "Draft saved in this conversation.",
+ "ca": "Draft saved in this conversation.",
+ "de": "Entwurf in dieser Unterhaltung gespeichert.",
+ "en": "Draft saved in this conversation.",
+ "es": "Borrador guardado en esta conversación.",
+ "fr": "Brouillon enregistré dans cette conversation.",
+ "it": "Draft saved in this conversation.",
+ "ja": "この会話に下書きを保存しました。",
+ "ko-KR": "Draft saved in this conversation.",
+ "no": "Draft saved in this conversation.",
+ "pt": "Draft saved in this conversation.",
+ "tr": "Draft saved in this conversation.",
+ "uk": "Draft saved in this conversation.",
+ "zh-CN": "Draft saved in this conversation.",
+ "zh-TW": "Draft saved in this conversation."
+ },
+ "AUTOMATION_SETUP$TEST_PASSED": {
+ "ar": "Draft looks valid.",
+ "ca": "Draft looks valid.",
+ "de": "Der Entwurf sieht gültig aus.",
+ "en": "Draft looks valid.",
+ "es": "El borrador parece válido.",
+ "fr": "Le brouillon semble valide.",
+ "it": "Draft looks valid.",
+ "ja": "下書きは有効です。",
+ "ko-KR": "Draft looks valid.",
+ "no": "Draft looks valid.",
+ "pt": "Draft looks valid.",
+ "tr": "Draft looks valid.",
+ "uk": "Draft looks valid.",
+ "zh-CN": "Draft looks valid.",
+ "zh-TW": "Draft looks valid."
+ },
+ "AUTOMATION_SETUP$CREATED": {
+ "ar": "Automation created.",
+ "ca": "Automation created.",
+ "de": "Automatisierung erstellt.",
+ "en": "Automation created.",
+ "es": "Automatización creada.",
+ "fr": "Automatisation créée.",
+ "it": "Automation created.",
+ "ja": "自動化を作成しました。",
+ "ko-KR": "Automation created.",
+ "no": "Automation created.",
+ "pt": "Automation created.",
+ "tr": "Automation created.",
+ "uk": "Automation created.",
+ "zh-CN": "Automation created.",
+ "zh-TW": "Automation created."
+ },
+ "AUTOMATION_SETUP$ENTRYPOINT": {
+ "ar": "نقطة الدخول",
+ "ca": "Punt d’entrada",
+ "de": "Einstiegspunkt",
+ "en": "Entrypoint",
+ "es": "Punto de entrada",
+ "fr": "Point d’entrée",
+ "it": "Punto di ingresso",
+ "ja": "エントリーポイント",
+ "ko-KR": "진입점",
+ "no": "Inngangspunkt",
+ "pt": "Ponto de entrada",
+ "tr": "Giriş noktası",
+ "uk": "Точка входу",
+ "zh-CN": "入口点",
+ "zh-TW": "進入點"
+ },
+ "AUTOMATION_SETUP$SETUP_SCRIPT_PATH": {
+ "ar": "مسار سكربت الإعداد",
+ "ca": "Camí de l’script de configuració",
+ "de": "Pfad zum Setup-Skript",
+ "en": "Setup script path",
+ "es": "Ruta del script de configuración",
+ "fr": "Chemin du script d’installation",
+ "it": "Percorso dello script di configurazione",
+ "ja": "セットアップスクリプトのパス",
+ "ko-KR": "설정 스크립트 경로",
+ "no": "Bane til oppsettskript",
+ "pt": "Caminho do script de configuração",
+ "tr": "Kurulum betiği yolu",
+ "uk": "Шлях до сценарію налаштування",
+ "zh-CN": "设置脚本路径",
+ "zh-TW": "設定指令碼路徑"
+ },
+ "AUTOMATION_SETUP$SETUP_SCRIPT": {
+ "ar": "سكربت الإعداد",
+ "ca": "Script de configuració",
+ "de": "Setup-Skript",
+ "en": "Setup script",
+ "es": "Script de configuración",
+ "fr": "Script d’installation",
+ "it": "Script di configurazione",
+ "ja": "セットアップスクリプト",
+ "ko-KR": "설정 스크립트",
+ "no": "Oppsettskript",
+ "pt": "Script de configuração",
+ "tr": "Kurulum betiği",
+ "uk": "Сценарій налаштування",
+ "zh-CN": "设置脚本",
+ "zh-TW": "設定指令碼"
+ },
+ "AUTOMATION_SETUP$ENTRYPOINT_REQUIRED": {
+ "ar": "أضف أمر نقطة دخول قبل المتابعة.",
+ "ca": "Afegeix una ordre de punt d’entrada abans de continuar.",
+ "de": "Fügen Sie vor dem Fortfahren einen Einstiegspunkt-Befehl hinzu.",
+ "en": "Add an entrypoint command before continuing.",
+ "es": "Añade un comando de punto de entrada antes de continuar.",
+ "fr": "Ajoutez une commande de point d’entrée avant de continuer.",
+ "it": "Aggiungi un comando di punto di ingresso prima di continuare.",
+ "ja": "続行する前にエントリーポイントコマンドを追加してください。",
+ "ko-KR": "계속하기 전에 진입점 명령을 추가하세요.",
+ "no": "Legg til en inngangspunktkommando før du fortsetter.",
+ "pt": "Adicione um comando de ponto de entrada antes de continuar.",
+ "tr": "Devam etmeden önce bir giriş noktası komutu ekleyin.",
+ "uk": "Додайте команду точки входу, перш ніж продовжити.",
+ "zh-CN": "继续之前,请添加入口点命令。",
+ "zh-TW": "繼續之前,請新增進入點命令。"
+ },
+ "AUTOMATION_SETUP$SETUP_SCRIPT_PATH_REQUIRED": {
+ "ar": "أضف مسار سكربت إعداد قبل المتابعة.",
+ "ca": "Afegeix el camí d’un script de configuració abans de continuar.",
+ "de": "Fügen Sie vor dem Fortfahren einen Setup-Skriptpfad hinzu.",
+ "en": "Add a setup script path before continuing.",
+ "es": "Añade una ruta de script de configuración antes de continuar.",
+ "fr": "Ajoutez un chemin de script d’installation avant de continuer.",
+ "it": "Aggiungi il percorso di uno script di configurazione prima di continuare.",
+ "ja": "続行する前にセットアップスクリプトのパスを追加してください。",
+ "ko-KR": "계속하기 전에 설정 스크립트 경로를 추가하세요.",
+ "no": "Legg til en bane til oppsettskriptet før du fortsetter.",
+ "pt": "Adicione um caminho de script de configuração antes de continuar.",
+ "tr": "Devam etmeden önce bir kurulum betiği yolu ekleyin.",
+ "uk": "Додайте шлях до сценарію налаштування, перш ніж продовжити.",
+ "zh-CN": "继续之前,请添加设置脚本路径。",
+ "zh-TW": "繼續之前,請新增設定指令碼路徑。"
+ },
+ "AUTOMATION_SETUP$SETUP_SCRIPT_REQUIRED": {
+ "ar": "أضف سكربت إعداد قبل المتابعة.",
+ "ca": "Afegeix un script de configuració abans de continuar.",
+ "de": "Fügen Sie vor dem Fortfahren ein Setup-Skript hinzu.",
+ "en": "Add a setup script before continuing.",
+ "es": "Añade un script de configuración antes de continuar.",
+ "fr": "Ajoutez un script d’installation avant de continuer.",
+ "it": "Aggiungi uno script di configurazione prima di continuare.",
+ "ja": "続行する前にセットアップスクリプトを追加してください。",
+ "ko-KR": "계속하기 전에 설정 스크립트를 추가하세요.",
+ "no": "Legg til et oppsettskript før du fortsetter.",
+ "pt": "Adicione um script de configuração antes de continuar.",
+ "tr": "Devam etmeden önce bir kurulum betiği ekleyin.",
+ "uk": "Додайте сценарій налаштування, перш ніж продовжити.",
+ "zh-CN": "继续之前,请添加设置脚本。",
+ "zh-TW": "繼續之前,請新增設定指令碼。"
+ },
+ "AUTOMATION_SETUP$HIDE_AGENT": {
+ "en": "Hide Agent",
+ "ja": "エージェントを非表示",
+ "zh-CN": "隐藏代理",
+ "zh-TW": "隱藏代理",
+ "ko-KR": "에이전트 숨기기",
+ "no": "Skjul agent",
+ "it": "Nascondi l'agente",
+ "pt": "Ocultar agente",
+ "es": "Ocultar agente",
+ "ar": "إخفاء الوكيل",
+ "fr": "Masquer l’agent",
+ "tr": "Ajanı gizle",
+ "de": "Agent ausblenden",
+ "uk": "Приховати агента",
+ "ca": "Amaga l'agent"
+ },
+ "AUTOMATION_SETUP$SHOW_AGENT": {
+ "en": "Show Agent",
+ "ja": "エージェントを表示",
+ "zh-CN": "显示代理",
+ "zh-TW": "顯示代理",
+ "ko-KR": "에이전트 표시",
+ "no": "Vis agent",
+ "it": "Mostra l'agente",
+ "pt": "Mostrar agente",
+ "es": "Mostrar agente",
+ "ar": "إظهار الوكيل",
+ "fr": "Afficher l’agent",
+ "tr": "Ajanı göster",
+ "de": "Agent anzeigen",
+ "uk": "Показати агента",
+ "ca": "Mostra l'agent"
+ },
+ "AUTOMATION_SETUP$VIEW_FORM": {
+ "en": "Form",
+ "ja": "フォーム",
+ "zh-CN": "表单",
+ "zh-TW": "表單",
+ "ko-KR": "양식",
+ "no": "Skjema",
+ "it": "Modulo",
+ "pt": "Formulário",
+ "es": "Formulario",
+ "ar": "النموذج",
+ "fr": "Formulaire",
+ "tr": "Form",
+ "de": "Formular",
+ "uk": "Форма",
+ "ca": "Formulari"
+ },
+ "AUTOMATION_SETUP$VIEW_CONVERSATION": {
+ "en": "Conversation",
+ "ja": "会話",
+ "zh-CN": "对话",
+ "zh-TW": "對話",
+ "ko-KR": "대화",
+ "no": "Samtale",
+ "it": "Conversazione",
+ "pt": "Conversa",
+ "es": "Conversación",
+ "ar": "المحادثة",
+ "fr": "Conversation",
+ "tr": "Sohbet",
+ "de": "Unterhaltung",
+ "uk": "Розмова",
+ "ca": "Conversa"
+ },
+ "AUTOMATION_SETUP$CONVERSATION_COMPOSER_PLACEHOLDER": {
+ "en": "What do you want to automate?",
+ "ja": "何を自動化しますか?",
+ "zh-CN": "你想自动化什么?",
+ "zh-TW": "你想自動化什麼?",
+ "ko-KR": "무엇을 자동화하고 싶으신가요?",
+ "no": "Hva vil du automatisere?",
+ "it": "Cosa vuoi automatizzare?",
+ "pt": "O que você quer automatizar?",
+ "es": "¿Qué quieres automatizar?",
+ "ar": "ماذا تريد أن تؤتمت؟",
+ "fr": "Que voulez-vous automatiser ?",
+ "tr": "Neyi otomatikleştirmek istiyorsunuz?",
+ "de": "Was möchtest du automatisieren?",
+ "uk": "Що ви хочете автоматизувати?",
+ "ca": "Què vols automatitzar?"
+ },
+ "AUTOMATION_SETUP$DOCKED_COMPOSER_PLACEHOLDER": {
+ "en": "Need help creating an automation?",
+ "ja": "自動化の設定でお困りですか?",
+ "zh-CN": "需要帮助创建自动化吗?",
+ "zh-TW": "需要協助建立自動化嗎?",
+ "ko-KR": "자동화 생성에 도움이 필요하신가요?",
+ "no": "Trenger du hjelp med å opprette en automatisering?",
+ "it": "Hai bisogno di aiuto per creare un'automazione?",
+ "pt": "Precisa de ajuda para criar uma automação?",
+ "es": "¿Necesitas ayuda para crear una automatización?",
+ "ar": "هل تحتاج إلى مساعدة في إنشاء أتمتة؟",
+ "fr": "Besoin d'aide pour créer une automatisation ?",
+ "tr": "Bir otomasyon oluşturmak için yardıma mı ihtiyacınız var?",
+ "de": "Brauchen Sie Hilfe beim Erstellen einer Automatisierung?",
+ "uk": "Потрібна допомога зі створенням автоматизації?",
+ "ca": "Necessites ajuda per crear una automatització?"
+ },
+ "AUTOMATION_SETUP$GITHUB_TOKEN_REQUIRED_TOOLTIP": {
+ "ar": "قم بتكوين سر \"GITHUB_TOKEN\" في صفحة الإعدادات لرؤية خيارات المستودعات.",
+ "ca": "Configura el secret \"GITHUB_TOKEN\" a la pàgina de configuració per veure les opcions de repositoris.",
+ "de": "Konfiguriere ein Anbieter-Token-Geheimnis, z. B. „GITHUB_TOKEN“, auf der Einstellungsseite, um Repo-Optionen zu sehen.",
+ "en": "Configure a provider token secret, e.g. \"GITHUB_TOKEN\", in the Settings page to see repo options.",
+ "es": "Configura el secreto \"GITHUB_TOKEN\" en la página de configuración para ver las opciones de repositorios.",
+ "fr": "Configurez un secret de jeton fournisseur, par exemple « GITHUB_TOKEN », dans la page des paramètres pour voir les options de dépôt.",
+ "it": "Configura il segreto \"GITHUB_TOKEN\" nella pagina delle impostazioni per vedere le opzioni dei repository.",
+ "ja": "リポジトリのオプションを表示するには、設定ページでプロバイダートークンシークレット(例:「GITHUB_TOKEN」)を設定してください。",
+ "ko-KR": "저장소 옵션을 보려면 설정 페이지에서 \"GITHUB_TOKEN\" 비밀을 구성하세요.",
+ "no": "Konfigurer \"GITHUB_TOKEN\"-hemmeligheten på innstillingssiden for å se repoalternativer.",
+ "pt": "Configure o segredo \"GITHUB_TOKEN\" na página de configurações para ver as opções de repositório.",
+ "tr": "Depo seçeneklerini görmek için ayarlar sayfasında \"GITHUB_TOKEN\" gizli anahtarını yapılandırın.",
+ "uk": "Налаштуйте секрет \"GITHUB_TOKEN\" на сторінці налаштувань, щоб бачити параметри репозиторіїв.",
+ "zh-CN": "在设置页面配置“GITHUB_TOKEN”密钥以查看仓库选项。",
+ "zh-TW": "在設定頁面設定「GITHUB_TOKEN」密鑰即可查看儲存庫選項。"
+ },
+ "AUTOMATION_SETUP$CUSTOM_PYTHON": {
+ "ar": "Custom Python",
+ "ca": "Custom Python",
+ "de": "Benutzerdefiniertes Python",
+ "en": "Custom Python",
+ "es": "Python personalizado",
+ "fr": "Python personnalisé",
+ "it": "Custom Python",
+ "ja": "カスタム Python",
+ "ko-KR": "Custom Python",
+ "no": "Custom Python",
+ "pt": "Custom Python",
+ "tr": "Custom Python",
+ "uk": "Custom Python",
+ "zh-CN": "Custom Python",
+ "zh-TW": "Custom Python"
}
}
diff --git a/src/types/git.d.ts b/src/types/git.d.ts
index 8d7b0f85d1..5fb8e434c1 100644
--- a/src/types/git.d.ts
+++ b/src/types/git.d.ts
@@ -44,6 +44,7 @@ interface BranchPage {
interface RepositoryPage {
items: GitRepository[];
next_page_id: string | null;
+ missing_token?: boolean;
}
/**
@@ -59,10 +60,10 @@ interface GitRepository {
full_name: string;
git_provider: Provider;
is_public: boolean;
- stargazers_count?: number;
+ stargazers_count?: number | null;
link_header?: string;
- pushed_at?: string;
- main_branch?: string;
+ pushed_at?: string | null;
+ main_branch?: string | null;
}
interface GitHubCommit {
diff --git a/tests/e2e/mock-llm/files/mock-llm-files-and-git.spec.ts b/tests/e2e/mock-llm/files/mock-llm-files-and-git.spec.ts
index d0fd7cce01..cab0bc88f8 100644
--- a/tests/e2e/mock-llm/files/mock-llm-files-and-git.spec.ts
+++ b/tests/e2e/mock-llm/files/mock-llm-files-and-git.spec.ts
@@ -340,6 +340,7 @@ test.describe("files tab, conversation overview git, and browser tab", () => {
await page.goto("/", { waitUntil: "domcontentloaded" });
await dismissAnalyticsModal(page);
await waitForTestId(page, "home-chat-launcher");
+ await page.getByTestId("home-launcher-mode-code").click();
// Start a brand-new conversation WITHOUT seeding any workspace metadata
await page.evaluate(