-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix Select on chat fail / redesign chat window / add storybook components #1140
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
Closed
Closed
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
8850ec9
Redesign Chat Window and Fix Chat Disabling Issue
chadgauth 0ca5cdc
Redesign Chat Window and Fix Chat Disabling Issue
chadgauth 2ccbe26
Merge branch 'feat/storybook-and-design-cleanup'
chadgauth adbf283
remove dup CSS, fix enhancing animation
chadgauth 80408bc
Merge pull request #2 from chadgauth/fix/loading-enhancing
chadgauth 2ebbd45
Redesign Chat Window and Fix Chat Disabling Issue
chadgauth 380050f
Redesign Chat Window and Fix Chat Disabling Issue
chadgauth d32a89f
remove dup CSS, fix enhancing animation
chadgauth 830dbba
fix message
chadgauth bbed890
update from PR comments / remove extra description
chadgauth 3f047f3
Merge origin/main keeping our changes
chadgauth 1ec6bd8
Merge pull request #3 from chadgauth/fix/merge-conflict
chadgauth bff44a1
cleanup and fix issue
chadgauth 9742f5e
Merge pull request #4 from chadgauth/fix/test
chadgauth 89f2056
merge main and add titles
chadgauth 40ab003
fix extension state
chadgauth 8b61fcc
Merge pull request #5 from chadgauth/fix/merge-conflict-roo
chadgauth 2be8751
fix the test
chadgauth c5982f0
Merge pull request #7 from chadgauth:fix/test-fails
chadgauth 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "roo-cline": minor | ||
| --- | ||
|
|
||
| Redesign chat window, update start screen, fix chat disabling, add Storybook stories. |
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
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,113 @@ | ||
| import { ExtensionStateContextType, ExtensionStateContext } from "../src/context/ExtensionStateContext" | ||
| import { defaultExtensionState } from "../../src/shared/ExtensionMessage" | ||
| import { McpServer } from "../../src/shared/mcp" | ||
| import { ApiConfiguration, ModelInfo } from "../../src/shared/api" | ||
| import { HistoryItem } from "../../src/shared/HistoryItem" // Import HistoryItem | ||
| import { useContext } from "react" | ||
|
|
||
| // Mock ModelInfo | ||
| const mockModelInfo: ModelInfo = { | ||
| contextWindow: 2048, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| reasoningEffort: "low", | ||
| } | ||
|
|
||
| // Mock API configuration | ||
| const mockApiConfig: ApiConfiguration = { | ||
| apiModelId: "mock-model", | ||
| glamaModelInfo: mockModelInfo, | ||
| } | ||
|
|
||
| // Mock MCP server | ||
| const mockMcpServer: McpServer = { | ||
| name: "mock-server", | ||
| tools: [], | ||
| resources: [], | ||
| resourceTemplates: [], | ||
| disabled: false, | ||
| config: "?", | ||
| status: "disconnected", | ||
| } | ||
|
|
||
| // Mock task history item (Corrected to match HistoryItem type) | ||
| const mockTaskHistoryItem: HistoryItem = { | ||
| id: "mock-task-id", | ||
| ts: Date.now(), | ||
| task: "Sample task", | ||
| tokensIn: 100, | ||
| tokensOut: 200, | ||
| totalCost: 0.5, | ||
| } | ||
|
|
||
| // Mock file paths and opened tabs (more realistic mock data) | ||
| const mockFilePaths: string[] = [ | ||
| "/Roo-Code/src/components/chat/ChatTextArea.tsx", | ||
| "/Roo-Code/src/components/common/CodeBlock.tsx", | ||
| "/Roo-Code/webview-ui/.storybook/preview-context.tsx", | ||
| ] | ||
| const mockOpenedTabs: Array<{ label: string; isActive: boolean; path?: string }> = [ | ||
| { label: "ChatTextArea.tsx", isActive: true, path: "/Roo-Code/src/components/chat/ChatTextArea.tsx" }, | ||
| { label: "CodeBlock.tsx", isActive: false, path: "/Roo-Code/src/components/common/CodeBlock.tsx" }, | ||
| ] | ||
|
|
||
| const defaultContext: ExtensionStateContextType = { | ||
| ...defaultExtensionState, | ||
| // Override specific properties for testing | ||
| theme: {}, | ||
| didHydrateState: true, | ||
| showWelcome: false, | ||
| apiConfiguration: mockApiConfig, | ||
| mcpServers: [mockMcpServer], | ||
| taskHistory: [mockTaskHistoryItem], | ||
| filePaths: mockFilePaths, | ||
| openedTabs: mockOpenedTabs, | ||
| // Add setter functions | ||
| setApiConfiguration: () => {}, | ||
| setCustomInstructions: () => {}, | ||
| setAlwaysAllowReadOnly: () => {}, | ||
| setAlwaysAllowWrite: () => {}, | ||
| setAlwaysAllowExecute: () => {}, | ||
| setAlwaysAllowBrowser: () => {}, | ||
| setAlwaysAllowMcp: () => {}, | ||
| setAlwaysAllowModeSwitch: () => {}, | ||
| setShowAnnouncement: () => {}, | ||
| setAllowedCommands: () => {}, | ||
| setSoundEnabled: () => {}, | ||
| setSoundVolume: () => {}, | ||
| setDiffEnabled: () => {}, | ||
| setCheckpointsEnabled: () => {}, | ||
| setBrowserViewportSize: () => {}, | ||
| setFuzzyMatchThreshold: () => {}, | ||
| setPreferredLanguage: () => {}, | ||
| setWriteDelayMs: () => {}, | ||
| setScreenshotQuality: () => {}, | ||
| setTerminalOutputLineLimit: () => {}, | ||
| setMcpEnabled: () => {}, | ||
| setEnableMcpServerCreation: () => {}, | ||
| setAlwaysApproveResubmit: () => {}, | ||
| setRequestDelaySeconds: () => {}, | ||
| setRateLimitSeconds: () => {}, | ||
| setCurrentApiConfigName: () => {}, | ||
| setListApiConfigMeta: () => {}, | ||
| setMode: () => {}, | ||
| setCustomModePrompts: () => {}, | ||
| setCustomSupportPrompts: () => {}, | ||
| setEnhancementApiConfigId: () => {}, | ||
| setExperimentEnabled: () => {}, | ||
| setAutoApprovalEnabled: () => {}, | ||
| setCustomModes: () => {}, | ||
| setMaxOpenTabsContext: () => {}, | ||
| } | ||
|
|
||
| export const PreviewExtensionStateContextProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => { | ||
| console.log("PreviewExtensionStateContextProvider is rendering!") // Re-add console log | ||
| console.log("Context Value:", defaultContext) // Log context value | ||
| return <ExtensionStateContext.Provider value={defaultContext}>{children}</ExtensionStateContext.Provider> | ||
| } | ||
|
|
||
| export const usePreviewExtensionState = () => { | ||
| const context = useContext(ExtensionStateContext) | ||
| console.log("useExtensionState Hook Context:", context) // Log context in hook | ||
| return context | ||
| } |
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,110 @@ | ||
| /* VS Code theme variables */ | ||
| :root { | ||
| /* Base theme */ | ||
| --vscode-foreground: #d1d5da; | ||
| --vscode-editor-background: #24292e; | ||
| --vscode-editor-foreground: #e1e4e8; | ||
|
|
||
| /* Input elements */ | ||
| --vscode-input-background: #2f363d; | ||
| --vscode-input-foreground: #e1e4e8; | ||
| --vscode-input-border: #1b1f23; | ||
| --vscode-focusBorder: #005cc5; | ||
|
|
||
| /* Buttons */ | ||
| --vscode-button-background: #176f2c; | ||
| --vscode-button-foreground: #dcffe4; | ||
| --vscode-button-hoverBackground: #1177bb; | ||
| --vscode-button-secondaryBackground: #444d56; | ||
| --vscode-button-secondaryForeground: #ffffff; | ||
|
|
||
| /* Dropdowns and Lists */ | ||
| --vscode-dropdown-background: #2f363d; | ||
| --vscode-dropdown-foreground: #e1e4e8; | ||
| --vscode-dropdown-border: #1b1f23; | ||
| --vscode-list-hoverBackground: #282e34; | ||
| --vscode-list-hoverForeground: #e1e4e8; | ||
| --vscode-list-focusBackground: #044289; | ||
|
|
||
| /* Badges and Notifications */ | ||
| --vscode-badge-background: #044289; | ||
| --vscode-badge-foreground: #c8e1ff; | ||
| --vscode-notifications-background: #2f363d; | ||
| --vscode-notifications-foreground: #e1e4e8; | ||
| --vscode-notifications-border: #1b1f23; | ||
|
|
||
| /* Editor elements */ | ||
| --vscode-editorGroup-border: #444444; | ||
| --vscode-diffEditor-insertedTextBackground: #37373d; | ||
| --vscode-diffEditor-removedTextBackground: #3c1f1f; | ||
| --vscode-textCodeBlock-background: #1e1e1e; | ||
| --vscode-textSeparator-foreground: #424242; | ||
| --vscode-textPreformat-foreground: #d7ba7d; | ||
| --vscode-textLink-foreground: #3794ff; | ||
|
|
||
| /* Status indicators */ | ||
| --vscode-errorForeground: #f97583; | ||
| --vscode-descriptionForeground: #959da5; | ||
| --vscode-charts-green: #89d185; | ||
| --vscode-titleBar-inactiveForeground: #cccccc99; | ||
|
|
||
| /* Menu (from shadcn/ui) */ | ||
| --vscode-menu-background: #2f363d; | ||
| --vscode-menu-foreground: #e1e4e8; | ||
| --vscode-disabledForeground: #cccccc; | ||
|
|
||
| /* Typography */ | ||
| --vscode-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; | ||
| --vscode-font-size: 13px; | ||
| --vscode-editor-font-family: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", | ||
| "DejaVu Sans Mono", "Courier New", monospace; | ||
| --vscode-editor-font-size: 12px; | ||
| --vscode-editor-line-height: 18px; | ||
| } | ||
|
|
||
| /* Dark theme */ | ||
| .dark { | ||
| color-scheme: dark; | ||
| background-color: var(--vscode-editor-background); | ||
| color: var(--vscode-editor-foreground); | ||
| } | ||
|
|
||
| /* Light theme */ | ||
| .light { | ||
| color-scheme: light; | ||
| background-color: #ffffff; | ||
| color: #000000; | ||
| } | ||
|
|
||
| /* Global styles */ | ||
| body { | ||
| margin: 0; | ||
| padding: 0; | ||
| font-family: var(--vscode-font-family); | ||
| font-size: var(--vscode-font-size); | ||
| line-height: 1.4; | ||
| } | ||
|
|
||
| /* Mermaid diagram styles */ | ||
| .mermaid { | ||
| background: var(--vscode-editor-background); | ||
| } | ||
|
|
||
| /* VS Code scrollbar styles */ | ||
| ::-webkit-scrollbar { | ||
chadgauth marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| width: 10px; | ||
| height: 10px; | ||
| } | ||
|
|
||
| ::-webkit-scrollbar-track { | ||
| background: transparent; | ||
| } | ||
|
|
||
| ::-webkit-scrollbar-thumb { | ||
| background: #424242; | ||
| border-radius: 5px; | ||
| } | ||
|
|
||
| ::-webkit-scrollbar-thumb:hover { | ||
| background: #686868; | ||
| } | ||
This file was deleted.
Oops, something went wrong.
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.