diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0bd47caf..2f63617c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,15 +90,8 @@ Here are the full options: `vscode-{win32-ia32 | win32-x64 | darwin-x64 | darwin ## Roadmap -Here are the most important topics on our Roadmap. More ⭐'s = more important. Please refer to our [Issues](https://github.com/voideditor/void/issues) page for the latest issues. +Please refer to our [Issues](https://github.com/voideditor/void/issues) page for the latest issues. -## ⭐⭐⭐ Make History work well. - -When the user submits a response or presses the apply/accept/reject button, we should add these events to the history, allowing the user to undo/redo them. Right now there is unexpected behavior if the user tries to undo or redo their changes. - -## ⭐⭐⭐ Build Cursor-style quick edits (Ctrl+K). - -When the user presses Ctrl+K, an input box should appear inline with the code that they were selecting. This is somewhat difficult to do because an extension alone cannot do this, and it requires creating a new component in the IDE. We think you can modify vscode's built-in "codelens" or "zone widget" components, but we are open to alternatives. ## ⭐⭐⭐ Creative. @@ -106,10 +99,6 @@ Examples: creating better code search, or supporting AI agents that can edit acr Eventually, we want to build a convenient API for creating AI tools. The API will provide methods for creating the UI (showing an autocomplete suggestion, or creating a new diff), detecting event changes (like `onKeystroke` or `onFileOpen`), and modifying the user's file-system (storing indexes associated with each file), making it much easier to make your own AI plugin. We plan on building these features further along in timeline, but we wanted to list them for completeness. -## ⭐ One-stars. - -⭐ Let the user Accept / Reject all Diffs in an entire file via the sidebar. - # Guidelines We're always glad to talk about new ideas, help you get set up, and make sure your changes align with our vision for the project. Feel free to shoot us a message in the #general channel of the [Discord](https://discord.gg/RSNjgaugJs) for any reason. Please check in especially if you want to make a lot of changes or build a large new feature. diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/ErrorDisplay.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ErrorDisplay.tsx similarity index 98% rename from src/vs/workbench/contrib/void/browser/react/src/util/ErrorDisplay.tsx rename to src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ErrorDisplay.tsx index ab11ff18..1663aad1 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/ErrorDisplay.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/ErrorDisplay.tsx @@ -1,7 +1,6 @@ import React, { useState } from 'react'; import { AlertCircle, ChevronDown, ChevronUp, X } from 'lucide-react'; -import { getCmdKey } from '../../../getCmdKey.js'; // const opaqueMessage = `\ // Unfortunately, Void can't see the full error. However, you should be able to find more details by pressing ${getCmdKey()}+Shift+P, typing "Toggle Developer Tools", and looking at the console.\n diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/InputBox.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/InputBox.tsx new file mode 100644 index 00000000..b84a506a --- /dev/null +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/InputBox.tsx @@ -0,0 +1,36 @@ +// import { useEffect, useRef } from 'react' +// import { HistoryInputBox } from '../../../../../../../base/browser/ui/inputbox/inputBox.js' +// import { useService } from '../util/services.js' +// import { defaultInputBoxStyles } from '../../../../../../../platform/theme/browser/defaultStyles.js' + +// export const InputBox = ({ onChangeText, placeholder, className }: { onChangeText: (value: string) => void, placeholder: string, className: string }) => { + +// const domNodeRef = useRef(null) + +// const contextViewProvider = useService('contextViewService') + + +// useEffect(() => { + +// const htmlNode = domNodeRef.current +// if (!htmlNode) return + + +// console.log('creating inputbox') +// const widget = new HistoryInputBox(htmlNode, contextViewProvider, { +// inputBoxStyles: defaultInputBoxStyles, +// placeholder, +// history: [], +// }) + + +// widget.onDidChange((newStr) => { onChangeText(newStr) }) + +// return () => { +// console.log('disposing inputbox') +// widget.dispose() +// } +// }, [onChangeText, contextViewProvider, placeholder]) + +// return
+// } diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx index e1786102..ce9bad77 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/Sidebar.tsx @@ -19,7 +19,7 @@ const Sidebar = () => { const { isHistoryOpen, currentTab: tab } = sidebarState return
-
+
{/* { const tabs = ['chat', 'settings', 'threadSelector'] @@ -27,7 +27,7 @@ const Sidebar = () => { sidebarStateService.setState({ currentTab: tabs[(index + 1) % tabs.length] as any }) }}>clickme {tab} */} -
+
diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index fb289f37..dbca67e9 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -16,10 +16,12 @@ import { IModelService } from '../../../../../../../editor/common/services/model import { URI } from '../../../../../../../base/common/uri.js'; import { EndOfLinePreference } from '../../../../../../../editor/common/model.js'; import { IDisposable } from '../../../../../../../base/common/lifecycle.js'; -import { ErrorDisplay } from '../util/ErrorDisplay.js'; +import { ErrorDisplay } from './ErrorDisplay.js'; import { LLMMessageServiceParams } from '../../../../../../../platform/void/common/llmMessageTypes.js'; +import { getCmdKey } from '../../../getCmdKey.js' -// import { } from '@vscode/webview-ui-toolkit/react'; +import { VSCodeDropdown } from '@vscode/webview-ui-toolkit/react'; +import { InputBox } from './InputBox.js'; // read files from VSCode const VSReadFile = async (modelService: IModelService, uri: URI): Promise => { @@ -292,25 +294,39 @@ export const SidebarChat = () => {
} + {/* error message */} + {latestError === null ? null : + { setLatestError(null) }} + />} +
{ if (e.key === 'Enter' && !e.shiftKey) onSubmit(e) }} onSubmit={(e) => { console.log('submit!') onSubmit(e) }}> + {/* input */} + {/* { setInstructions(newStr) }} + className='w-full p-2 leading-tight resize-none max-h-[50vh] overflow-auto bg-transparent border-none !outline-none' + /> */}