-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ai-chat): add Claude Code multi-step workflow panel (#462) #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
87ee013
feat(ai-chat): add Claude Code multi-step workflow panel (#462)
otomatty 899e91e
fix: address PR #477 review comments
otomatty 83bb2e1
fix: address CodeRabbit PR #477 review (workflow UI, a11y, streamClau…
otomatty f823f68
fix: address PR #477 Devin review (workflow height, resume by step id)
otomatty 07128a4
fix: address PR #477 review (chat input mount, progress step alignment)
otomatty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| /** | ||
| * Multi-step Claude Code workflow UI (Issue #462). | ||
| * Claude Code マルチステップワークフロー UI(Issue #462)。 | ||
| */ | ||
|
|
||
| import { useWorkflowPanelLogic } from "@/hooks/useWorkflowPanelLogic"; | ||
| import { WorkflowPanelForm } from "./WorkflowPanelForm"; | ||
|
|
||
| /** | ||
| * Workflow editor and runner embedded in the AI chat panel. | ||
| * AI チャットパネルに埋め込むワークフロー編集・実行。 | ||
| */ | ||
| export function AIChatWorkflowPanel() { | ||
| const logic = useWorkflowPanelLogic(); | ||
| return <WorkflowPanelForm {...logic} />; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| /** | ||
| * Form layout for the workflow panel (Issue #462). | ||
| * ワークフローパネルのフォームレイアウト(Issue #462)。 | ||
| */ | ||
|
|
||
| import { Button, ScrollArea } from "@zedi/ui"; | ||
| import { ListChecks, Pause, Play, Square } from "lucide-react"; | ||
| import { isTauriDesktop } from "@/lib/platform"; | ||
| import { WorkflowPanelMetaSection } from "./WorkflowPanelMetaSection"; | ||
| import { WorkflowPanelStepsAndProgress } from "./WorkflowPanelStepsAndProgress"; | ||
| import type { WorkflowPanelFormProps } from "./workflowPanelTypes"; | ||
|
|
||
| export type { WorkflowPanelFormProps } from "./workflowPanelTypes"; | ||
|
|
||
| /** | ||
| * Renders workflow name, templates, steps, progress, and run controls. | ||
| * ワークフロー名・テンプレート・ステップ・進捗・実行操作を描画する。 | ||
| */ | ||
| export function WorkflowPanelForm(props: WorkflowPanelFormProps) { | ||
| const { | ||
| t, | ||
| draft, | ||
| setDraft, | ||
| definitions, | ||
| selectedSavedId, | ||
| progress, | ||
| activeRunSteps, | ||
| pausedState, | ||
| importInputRef, | ||
| isEditor, | ||
| running, | ||
| runExecution, | ||
| handlePause, | ||
| handleStop, | ||
| addStep, | ||
| removeStep, | ||
| updateStep, | ||
| loadTemplate, | ||
| saveCustom, | ||
| exportJson, | ||
| onImportFile, | ||
| loadSaved, | ||
| deleteSaved, | ||
| } = props; | ||
|
|
||
| return ( | ||
| <div className="flex h-full min-h-0 flex-col gap-3 p-3"> | ||
| <div className="text-muted-foreground flex items-center gap-2 text-xs"> | ||
| <ListChecks className="h-4 w-4 shrink-0" /> | ||
| <span>{t("aiChat.workflow.subtitle")}</span> | ||
| </div> | ||
|
|
||
| {!isTauriDesktop() && ( | ||
| <p className="text-destructive text-xs">{t("aiChat.workflow.desktopOnly")}</p> | ||
| )} | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| <ScrollArea className="min-h-0 flex-1 pr-2"> | ||
| <div className="flex flex-col gap-3 pb-2"> | ||
| <WorkflowPanelMetaSection | ||
| t={t} | ||
| draft={draft} | ||
| setDraft={setDraft} | ||
| definitions={definitions} | ||
| selectedSavedId={selectedSavedId} | ||
| importInputRef={importInputRef} | ||
| running={running} | ||
| loadTemplate={loadTemplate} | ||
| saveCustom={saveCustom} | ||
| exportJson={exportJson} | ||
| onImportFile={onImportFile} | ||
| loadSaved={loadSaved} | ||
| deleteSaved={deleteSaved} | ||
| /> | ||
| <WorkflowPanelStepsAndProgress | ||
| t={t} | ||
| draft={draft} | ||
| running={running} | ||
| progress={progress} | ||
| activeRunSteps={activeRunSteps} | ||
| addStep={addStep} | ||
| removeStep={removeStep} | ||
| updateStep={updateStep} | ||
| /> | ||
| </div> | ||
| </ScrollArea> | ||
|
|
||
| <div className="border-border flex flex-wrap gap-2 border-t pt-2"> | ||
| <Button | ||
| type="button" | ||
| size="sm" | ||
| className="h-8 text-xs" | ||
| disabled={running || !isEditor} | ||
| onClick={() => void runExecution("fresh")} | ||
| > | ||
| <Play className="mr-1 h-3 w-3" /> | ||
| {t("aiChat.workflow.run")} | ||
| </Button> | ||
| <Button | ||
| type="button" | ||
| variant="secondary" | ||
| size="sm" | ||
| className="h-8 text-xs" | ||
| disabled={!running} | ||
| onClick={handlePause} | ||
| > | ||
| <Pause className="mr-1 h-3 w-3" /> | ||
| {t("aiChat.workflow.pause")} | ||
| </Button> | ||
| <Button | ||
| type="button" | ||
| variant="secondary" | ||
| size="sm" | ||
| className="h-8 text-xs" | ||
| disabled={running || !pausedState} | ||
| onClick={() => void runExecution("resume")} | ||
| > | ||
| {t("aiChat.workflow.resume")} | ||
| </Button> | ||
| <Button | ||
| type="button" | ||
| variant="destructive" | ||
| size="sm" | ||
| className="h-8 text-xs" | ||
| disabled={!running} | ||
| onClick={handleStop} | ||
| > | ||
| <Square className="mr-1 h-3 w-3" /> | ||
| {t("aiChat.workflow.stop")} | ||
| </Button> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.