-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
vscode/webviews/chat/cells/messageCell/human/editor/ToolboxButton.story.tsx
This file contains 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,80 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { VSCodeStandaloneComponent } from '../../../../../storybook/VSCodeStoryDecorator' | ||
import { ToolboxButton } from './ToolboxButton' | ||
|
||
const meta: Meta<typeof ToolboxButton> = { | ||
title: 'cody/ToolboxButton', | ||
component: ToolboxButton, | ||
decorators: [VSCodeStandaloneComponent], | ||
args: { | ||
isFirstMessage: true, | ||
}, | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof ToolboxButton> | ||
|
||
export const Default: Story = { | ||
args: { | ||
settings: { | ||
agent: { | ||
name: 'deep-cody', | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export const AgentDisabled: Story = { | ||
args: { | ||
settings: { | ||
agent: { | ||
name: undefined, | ||
}, | ||
shell: { | ||
enabled: false, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export const FullyEnabled: Story = { | ||
args: { | ||
settings: { | ||
agent: { | ||
name: 'deep-cody', | ||
}, | ||
shell: { | ||
enabled: true, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export const ShellNotSupported: Story = { | ||
args: { | ||
settings: { | ||
agent: { | ||
name: 'deep-cody', | ||
}, | ||
shell: { | ||
enabled: false, | ||
error: 'Terminal access is not enabled on either instance or client.', | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export const NonFirstMessage: Story = { | ||
args: { | ||
settings: { | ||
agent: { | ||
name: 'deep-cody', | ||
}, | ||
shell: { | ||
enabled: true, | ||
}, | ||
}, | ||
isFirstMessage: false, | ||
}, | ||
} |
This file contains 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