mirror of
https://github.com/voideditor/void.git
synced 2025-03-15 07:27:58 +00:00
rename linemage -> void, LineMage -> Void (partial)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "LineMage",
|
||||
"name": "Void",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
|
@ -13,7 +13,7 @@
|
||||
],
|
||||
"rules": {
|
||||
"constructor-super": "warn",
|
||||
"curly": "off", // <-- LineMage
|
||||
"curly": "off", // <-- Void
|
||||
"eqeqeq": "warn",
|
||||
"prefer-const": [
|
||||
"warn",
|
||||
@ -51,7 +51,7 @@
|
||||
"no-var": "warn",
|
||||
"jsdoc/no-types": "warn",
|
||||
"semi": "off",
|
||||
"@typescript-eslint/semi": "off", // <-- LineMage
|
||||
"@typescript-eslint/semi": "off", // <-- Void
|
||||
"@typescript-eslint/member-delimiter-style": "warn",
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"warn",
|
||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -93,7 +93,7 @@
|
||||
}
|
||||
],
|
||||
"git.ignoreLimitWarning": true,
|
||||
// we removed this for LineMage:
|
||||
// we removed this for Void:
|
||||
// "git.branchProtection": [
|
||||
// "main",
|
||||
// "distro",
|
||||
|
@ -1,10 +1,10 @@
|
||||
|
||||
|
||||
# Contributing to LineMage
|
||||
# Contributing to Void
|
||||
|
||||
Welcome! 👋 This is a guide on how to contribute to LineMage. We want to make it as easy as possible to contribute, so if you have any questions or comments, reach out via email or discord!
|
||||
Welcome! 👋 This is a guide on how to contribute to Void. We want to make it as easy as possible to contribute, so if you have any questions or comments, reach out via email or discord!
|
||||
|
||||
There are two main ways to contribute:
|
||||
There are two main ways to contribute:
|
||||
|
||||
- Suggest New Features (discord)
|
||||
- Build New Features (roadmap)
|
||||
@ -12,7 +12,7 @@ There are two main ways to contribute:
|
||||
|
||||
See the [Roadmap](#roadmap) section for a list of the most important features to build, or feel free to build your own features.
|
||||
|
||||
We use a [VSCode extension](https://code.visualstudio.com/api/get-started/your-first-extension) to implement most of LineMage's functionality. Scroll down to see 1. How to contribute to the Extension, or 2. How to contribute to the full IDE (for more native changes).
|
||||
We use a [VSCode extension](https://code.visualstudio.com/api/get-started/your-first-extension) to implement most of Void's functionality. Scroll down to see 1. How to contribute to the Extension, or 2. How to contribute to the full IDE (for more native changes).
|
||||
|
||||
|
||||
|
||||
@ -21,30 +21,30 @@ We use a [VSCode extension](https://code.visualstudio.com/api/get-started/your-f
|
||||
|
||||
Here are the most important topics on our Roadmap. More ⭐'s = more important.
|
||||
|
||||
## ⭐⭐⭐ Improve diffs.
|
||||
## ⭐⭐⭐ Improve diffs.
|
||||
|
||||
We define a "diff" as a single green/red pair that denotes a change. Here are improvements to make:
|
||||
|
||||
1. Fix bugginess when the user presses "Accept" or "Reject" on a diff. One issue is that when a diff is accepted/rejected all of the diffs below should be updated (because they are now on different line numbers). There are also other miscellaneous bugs that need fixing.
|
||||
|
||||
4. Make diff highlighting dynamic. Right now when the user edits text, we clear all the diffs and their highlights. Instead, we should simply update the highlighting of the diff. Each diff lives on a range of lines, and all changes inside that range or intersecting with it should update its highlighting.
|
||||
4. Make diff highlighting dynamic. Right now when the user edits text, we clear all the diffs and their highlights. Instead, we should simply update the highlighting of the diff. Each diff lives on a range of lines, and all changes inside that range or intersecting with it should update its highlighting.
|
||||
|
||||
5. Show deletion (-) diffs. Right now we're only showing insertion (+) diffs. Diffs currently work by highlighting all of the new code in green with a simple text decoration. Instead, we would like to use code from VS Code's native diffEditor to show the diffs ("inline" mode). We could alternatively keep what we have and add red zones of the deleted code to indicate a deletion diff (-).
|
||||
|
||||
## ⭐⭐⭐ Build Cursor-style quick edits (ctrl+k).
|
||||
## ⭐⭐⭐ 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.
|
||||
|
||||
## ⭐⭐⭐ 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.
|
||||
|
||||
## ⭐⭐⭐ Improve Ctrl+L backend.
|
||||
## ⭐⭐⭐ Improve Ctrl+L backend.
|
||||
|
||||
Right now, the model outputs entire files. Instead, we should change the prompt so that the model outputs partial changes like `// ... rest of file`. When the user clicks the "Apply" button, the model should rewrite the file and apply the partial changes in the correct locations.
|
||||
|
||||
## ⭐⭐ Integrate with Ollama.
|
||||
## ⭐⭐ Integrate with Ollama.
|
||||
|
||||
We have an Ollama integration coded up in the extension, but it breaks. This is because Ollama has Node.js dependencies like 'path' and 'os' which cannot run in extensions (extensions have to be able to run in the browser). To fix this, we need to migrate LineMage's extension so that it runs natively into the VS Code editor so that we can access Node.js.
|
||||
We have an Ollama integration coded up in the extension, but it breaks. This is because Ollama has Node.js dependencies like 'path' and 'os' which cannot run in extensions (extensions have to be able to run in the browser). To fix this, we need to migrate Void's extension so that it runs natively into the VS Code editor so that we can access Node.js.
|
||||
|
||||
## ⭐ One-stars.
|
||||
|
||||
@ -70,11 +70,11 @@ Here's how you can start contributing to the Extension:
|
||||
|
||||
1. Clone the repository
|
||||
|
||||
`git clone https://github.com/linemagedev/linemage`
|
||||
`git clone https://github.com/voideditor/void`
|
||||
|
||||
2. Open the extension folder
|
||||
|
||||
`cd /extensions/linemage`
|
||||
`cd /extensions/void`
|
||||
|
||||
3. Install dependencies
|
||||
|
||||
@ -88,7 +88,7 @@ Here's how you can start contributing to the Extension:
|
||||
|
||||
Press <kbd>F5</kbd>. This will start a new instance of VS Code with the extension enabled. If this does not work, you can press <kbd>F1</kbd>, select "Debug: Start Debugging", press <kbd>Enter</kbd>, and select "VS Code Extension Development".
|
||||
|
||||
If you would like to use AI features, you need to provide an API key. You can do that by going to Settings (<kbd>Ctrl+,</kbd>) and modifying `linemage > "Anthropic Api Key"`. The "Which API" environment variable controls the provider and defaults to "anthropic".
|
||||
If you would like to use AI features, you need to provide an API key. You can do that by going to Settings (<kbd>Ctrl+,</kbd>) and modifying `void > "Anthropic Api Key"`. The "Which API" environment variable controls the provider and defaults to "anthropic".
|
||||
|
||||
## 2. Contributing to the full IDE
|
||||
|
||||
@ -138,6 +138,9 @@ Please submit all Pull Requests to the `dev` branch.
|
||||
|
||||
<!--
|
||||
|
||||
TODO we should probably just delete all this... :
|
||||
|
||||
|
||||
### Design principles
|
||||
|
||||
- Least amount of eye movement necessary; if user presses submit, show them the message where they submitted
|
||||
@ -159,7 +162,7 @@ Please submit all Pull Requests to the `dev` branch.
|
||||
|
||||
### Core
|
||||
|
||||
- Migrate the LineMage extension to live natively in VS Code. There's initial work here at `linemage.contribution.ts`.
|
||||
- Migrate the Void extension to live natively in VS Code. There's initial work here at `void.contribution.ts`.
|
||||
|
||||
- Allow access to the VS Code extension marketplace.
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
# Welcome to LineMage!
|
||||
# Welcome to Void!
|
||||
|
||||
|
||||
LineMage is the open-source Cursor alternative. It's a fork of the of [vscode](https://github.com/microsoft/vscode) repository.
|
||||
Void is the open-source Cursor alternative. It's a fork of the of [vscode](https://github.com/microsoft/vscode) repository.
|
||||
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
To contribute, see [`CONTRIBUTING.md`](https://github.com/linemagedev/linemage/blob/main/CONTRIBUTING.md).
|
||||
To contribute, see [`CONTRIBUTING.md`](https://github.com/voideditor/void/blob/main/CONTRIBUTING.md).
|
||||
|
||||
We're in very early stages and building quickly. We welcome all new contributions!
|
||||
|
||||
## Reference
|
||||
For some useful links we've compiled see [`LINEMAGE_USEFUL_LINKS.md`](https://github.com/linemagedev/linemage/blob/main/LINEMAGE_VSCODE_GUIDE.md).
|
||||
For some useful links we've compiled see [`VOID_USEFUL_LINKS.md`](https://github.com/voideditor/void/blob/main/VOID_USEFUL_LINKS.md).
|
||||
|
||||
## Anything else
|
||||
Feel free to reach out in our Discord or contact us via email.
|
||||
|
@ -1,11 +1,11 @@
|
||||
# Useful links
|
||||
|
||||
LineMage put together this list of links to get up and running with VSCode's sourcecode. We hope it's helpful!
|
||||
The Void team put together this list of links to get up and running with VSCode's sourcecode. We hope it's helpful!
|
||||
|
||||
## Beginners / Getting started
|
||||
|
||||
- [VSCode UI guide](https://code.visualstudio.com/docs/getstarted/userinterface) - covers auxbar, panels, etc.
|
||||
|
||||
|
||||
- [UX guide](https://code.visualstudio.com/api/ux-guidelines/overview) - covers Containers, Views, Items, etc.
|
||||
|
||||
## Contributing
|
||||
@ -18,7 +18,7 @@ LineMage put together this list of links to get up and running with VSCode's sou
|
||||
|
||||
## VSCode's Extension API
|
||||
|
||||
LineMage is mostly an extension right now, and these links were very useful for us to get set up.
|
||||
Void is mainly an extension right now, and these links were very useful for us to get set up.
|
||||
|
||||
- [Files you need in an extension](https://code.visualstudio.com/api/get-started/extension-anatomy).
|
||||
|
@ -264,7 +264,7 @@ function createGitIndexVinyls(paths) {
|
||||
return pall(fns, { concurrency: 4 }).then((r) => r.filter((p) => !!p));
|
||||
}
|
||||
|
||||
// NO PRE COMMIT HOOKS!!!! for now... - LineMage team
|
||||
// NO PRE COMMIT HOOKS!!!! for now... - Void team
|
||||
|
||||
// // this allows us to run hygiene as a git pre-commit hook
|
||||
// if (require.main === module) {
|
||||
|
@ -19,7 +19,7 @@
|
||||
],
|
||||
"workbench": [
|
||||
{
|
||||
"name": "vs/workbench/contrib/linemage",
|
||||
"name": "vs/workbench/contrib/void",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ const fs = require('fs');
|
||||
|
||||
// Complete list of directories where yarn should be executed to install node modules
|
||||
const dirs = [
|
||||
'extensions/linemage', // <-- linemage
|
||||
'extensions/void', // <-- Void
|
||||
|
||||
'',
|
||||
'build',
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "linemage",
|
||||
"displayName": "LineMage",
|
||||
"name": "void",
|
||||
"displayName": "Void",
|
||||
"description": "",
|
||||
"version": "0.0.1",
|
||||
"engines": {
|
||||
@ -15,32 +15,32 @@
|
||||
"configuration": {
|
||||
"title": "API Keys",
|
||||
"properties": {
|
||||
"linemage.whichApi": {
|
||||
"void.whichApi": {
|
||||
"type": "string",
|
||||
"default": "anthropic",
|
||||
"description": "Choose a model to use (anthropic | openai | greptile | ollama)"
|
||||
},
|
||||
"linemage.anthropicApiKey": {
|
||||
"void.anthropicApiKey": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Anthropic API Key"
|
||||
},
|
||||
"linemage.openAIApiKey": {
|
||||
"void.openAIApiKey": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "OpenAI API Key"
|
||||
},
|
||||
"linemage.greptileApiKey": {
|
||||
"void.greptileApiKey": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Greptile API Key"
|
||||
},
|
||||
"linemage.githubPAT": {
|
||||
"void.githubPAT": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Greptile - Github PAT (gives Greptile access to your repo)"
|
||||
},
|
||||
"linemage.ollamaSettings": {
|
||||
"void.ollamaSettings": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Ollama settings (coming soon...)"
|
||||
@ -49,48 +49,48 @@
|
||||
},
|
||||
"commands": [
|
||||
{
|
||||
"command": "linemage.ctrl+l",
|
||||
"command": "void.ctrl+l",
|
||||
"title": "Show Sidebar"
|
||||
},
|
||||
{
|
||||
"command": "linemage.ctrl+k",
|
||||
"command": "void.ctrl+k",
|
||||
"title": "Show Selection Lens"
|
||||
},
|
||||
{
|
||||
"command": "linemage.approveDiff",
|
||||
"command": "void.approveDiff",
|
||||
"title": "Approve Diff"
|
||||
},
|
||||
{
|
||||
"command": "linemage.discardDiff",
|
||||
"command": "void.discardDiff",
|
||||
"title": "Discard Diff"
|
||||
}
|
||||
],
|
||||
"viewsContainers": {
|
||||
"activitybar": [
|
||||
{
|
||||
"id": "linemageViewContainer",
|
||||
"id": "voidViewContainer",
|
||||
"title": "My Extension",
|
||||
"icon": "$(hubot)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"views": {
|
||||
"linemageViewContainer": [
|
||||
"voidViewContainer": [
|
||||
{
|
||||
"type": "webview",
|
||||
"id": "linemage.viewnumberone",
|
||||
"name": "LineMage"
|
||||
"id": "void.viewnumberone",
|
||||
"name": "Void"
|
||||
}
|
||||
]
|
||||
},
|
||||
"keybindings": [
|
||||
{
|
||||
"command": "linemage.ctrl+l",
|
||||
"command": "void.ctrl+l",
|
||||
"key": "ctrl+l",
|
||||
"mac": "cmd+l"
|
||||
},
|
||||
{
|
||||
"command": "linemage.ctrl+k",
|
||||
"command": "void.ctrl+k",
|
||||
"key": "ctrl+k",
|
||||
"mac": "cmd+k"
|
||||
}
|
||||
|
@ -117,8 +117,8 @@ export class ApprovalCodeLensProvider implements vscode.CodeLensProvider {
|
||||
for (let diff of diffs) {
|
||||
const { range, diffid, lenses: codeLenses } = diff
|
||||
|
||||
let approveLens = new vscode.CodeLens(range, { title: 'Accept', command: 'linemage.approveDiff', arguments: [{ diffid }] })
|
||||
let discardLens = new vscode.CodeLens(range, { title: 'Reject', command: 'linemage.discardDiff', arguments: [{ diffid }] })
|
||||
let approveLens = new vscode.CodeLens(range, { title: 'Accept', command: 'void.approveDiff', arguments: [{ diffid }] })
|
||||
let discardLens = new vscode.CodeLens(range, { title: 'Reject', command: 'void.discardDiff', arguments: [{ diffid }] })
|
||||
|
||||
codeLenses.push(discardLens, approveLens)
|
||||
}
|
||||
@ -138,7 +138,7 @@ export class ApprovalCodeLensProvider implements vscode.CodeLensProvider {
|
||||
console.log('diffs after added:', this._diffsOfDocument[docUriStr])
|
||||
}
|
||||
|
||||
// called on linemage.approveDiff
|
||||
// called on void.approveDiff
|
||||
public async approveDiff({ diffid }: { diffid: number }) {
|
||||
const editor = vscode.window.activeTextEditor
|
||||
if (!editor)
|
||||
@ -168,7 +168,7 @@ export class ApprovalCodeLensProvider implements vscode.CodeLensProvider {
|
||||
}
|
||||
|
||||
|
||||
// called on linemage.discardDiff
|
||||
// called on void.discardDiff
|
||||
public async discardDiff({ diffid }: { diffid: number }) {
|
||||
const editor = vscode.window.activeTextEditor
|
||||
if (!editor)
|
||||
@ -180,7 +180,7 @@ export class ApprovalCodeLensProvider implements vscode.CodeLensProvider {
|
||||
// get index of this diff in diffsOfDocument
|
||||
const index = this._diffsOfDocument[docUriStr].findIndex(diff => diff.diffid === diffid);
|
||||
if (index === -1) {
|
||||
console.error('LineMage error: DiffID could not be found: ', diffid, this._diffsOfDocument[docUriStr])
|
||||
console.error('Void error: DiffID could not be found: ', diffid, this._diffsOfDocument[docUriStr])
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ function getNonce() {
|
||||
}
|
||||
|
||||
export class SidebarWebviewProvider implements vscode.WebviewViewProvider {
|
||||
public static readonly viewId = 'linemage.viewnumberone';
|
||||
public static readonly viewId = 'void.viewnumberone';
|
||||
|
||||
public webview: Promise<vscode.Webview> // used to send messages to the webview
|
||||
|
||||
|
@ -15,7 +15,7 @@ export type ApiConfig = {
|
||||
githubPAT: string,
|
||||
repoinfo: {
|
||||
remote: string, // e.g. 'github'
|
||||
repository: string, // e.g. 'linemagedev/linemage'
|
||||
repository: string, // e.g. 'voideditor/void'
|
||||
branch: string // e.g. 'main'
|
||||
}
|
||||
},
|
||||
|
@ -13,11 +13,11 @@ const readFileContentOfUri = async (uri: vscode.Uri) => {
|
||||
|
||||
const getApiConfig = () => {
|
||||
const apiConfig: ApiConfig = {
|
||||
anthropic: { apikey: vscode.workspace.getConfiguration('linemage').get('anthropicApiKey') ?? '' },
|
||||
openai: { apikey: vscode.workspace.getConfiguration('linemage').get('openAIApiKey') ?? '' },
|
||||
anthropic: { apikey: vscode.workspace.getConfiguration('void').get('anthropicApiKey') ?? '' },
|
||||
openai: { apikey: vscode.workspace.getConfiguration('void').get('openAIApiKey') ?? '' },
|
||||
greptile: {
|
||||
apikey: vscode.workspace.getConfiguration('linemage').get('greptileApiKey') ?? '',
|
||||
githubPAT: vscode.workspace.getConfiguration('linemage').get('githubPAT') ?? '',
|
||||
apikey: vscode.workspace.getConfiguration('void').get('greptileApiKey') ?? '',
|
||||
githubPAT: vscode.workspace.getConfiguration('void').get('githubPAT') ?? '',
|
||||
repoinfo: {
|
||||
remote: 'github',
|
||||
repository: 'TODO',
|
||||
@ -25,9 +25,9 @@ const getApiConfig = () => {
|
||||
}
|
||||
},
|
||||
ollama: {
|
||||
// apikey: vscode.workspace.getConfiguration('linemage').get('ollamaSettings') ?? '',
|
||||
// apikey: vscode.workspace.getConfiguration('void').get('ollamaSettings') ?? '',
|
||||
},
|
||||
whichApi: vscode.workspace.getConfiguration('linemage').get('whichApi') ?? ''
|
||||
whichApi: vscode.workspace.getConfiguration('void').get('whichApi') ?? ''
|
||||
}
|
||||
return apiConfig
|
||||
}
|
||||
@ -42,14 +42,14 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
// 2. Activate the sidebar on ctrl+l
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('linemage.ctrl+l', () => {
|
||||
vscode.commands.registerCommand('void.ctrl+l', () => {
|
||||
|
||||
const editor = vscode.window.activeTextEditor
|
||||
if (!editor)
|
||||
return
|
||||
|
||||
// show the sidebar
|
||||
vscode.commands.executeCommand('workbench.view.extension.linemageViewContainer');
|
||||
vscode.commands.executeCommand('workbench.view.extension.voidViewContainer');
|
||||
// vscode.commands.executeCommand('vscode.moveViewToPanel', CustomViewProvider.viewId); // move to aux bar
|
||||
|
||||
// get the text the user is selecting
|
||||
@ -71,10 +71,10 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
context.subscriptions.push(vscode.languages.registerCodeLensProvider('*', approvalCodeLensProvider));
|
||||
|
||||
// 4. Add approve/reject commands
|
||||
context.subscriptions.push(vscode.commands.registerCommand('linemage.approveDiff', async (params) => {
|
||||
context.subscriptions.push(vscode.commands.registerCommand('void.approveDiff', async (params) => {
|
||||
approvalCodeLensProvider.approveDiff(params)
|
||||
}));
|
||||
context.subscriptions.push(vscode.commands.registerCommand('linemage.discardDiff', async (params) => {
|
||||
context.subscriptions.push(vscode.commands.registerCommand('void.discardDiff', async (params) => {
|
||||
approvalCodeLensProvider.discardDiff(params)
|
||||
}));
|
||||
|
||||
@ -85,7 +85,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
// when config changes, send it to the sidebar
|
||||
vscode.workspace.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration('linemage')) {
|
||||
if (e.affectsConfiguration('void')) {
|
||||
const apiConfig = getApiConfig()
|
||||
webview.postMessage({ type: 'apiConfig', apiConfig } satisfies WebviewMessage)
|
||||
}
|
||||
@ -140,7 +140,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
// const ctrlKCodeLensProvider = new CtrlKCodeLensProvider();
|
||||
// context.subscriptions.push(vscode.languages.registerCodeLensProvider('*', ctrlKCodeLensProvider));
|
||||
// context.subscriptions.push(
|
||||
// vscode.commands.registerCommand('linemage.ctrl+k', () => {
|
||||
// vscode.commands.registerCommand('void.ctrl+k', () => {
|
||||
// const editor = vscode.window.activeTextEditor;
|
||||
// if (!editor)
|
||||
// return
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"nameShort": "LineMage",
|
||||
"nameLong": "LineMage",
|
||||
"nameShort": "Void",
|
||||
"nameLong": "Void",
|
||||
"applicationName": "code-oss",
|
||||
"dataFolderName": ".vscode-oss",
|
||||
"win32MutexName": "vscodeoss",
|
||||
|
@ -552,8 +552,8 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
},
|
||||
|
||||
|
||||
// LINEMAGE added this (I think will need to add this back when add ctrl+K)
|
||||
// registerLineMageCtrlKProvider(selector: vscode.DocumentSelector, provider: vscode.CodeLensProvider): vscode.Disposable {
|
||||
// VOID added this (I think will need to add this back when add ctrl+K)
|
||||
// registerVoidCtrlKProvider(selector: vscode.DocumentSelector, provider: vscode.CodeLensProvider): vscode.Disposable {
|
||||
// return extHostLanguageFeatures.registerCodeLensProvider(extension, checkSelector(selector), provider);
|
||||
// },
|
||||
|
||||
|
@ -304,16 +304,17 @@ const newCommands: ApiCommand[] = [
|
||||
})(value);
|
||||
})
|
||||
),
|
||||
// // --- LineMage code lens
|
||||
// // --- Void code lens
|
||||
// new ApiCommand(
|
||||
// 'vscode.executeLineMageCodeLensProvider', '_executeLineMageCodeLensProvider', 'Execute LineMage code lens provider.',
|
||||
// 'vscode.executeVoidCodeLensProvider', '_executeVoidCodeLensProvider', 'Execute Void code lens provider.',
|
||||
// [ApiCommandArgument.Uri, ApiCommandArgument.Number.with('itemResolveCount', 'Number of lenses that should be resolved and returned. Will only return resolved lenses, will impact performance)').optional()],
|
||||
// new ApiCommandResult<languages.CodeLens[], vscode.CodeLens[] | undefined>('A promise that resolves to an array of LineMageCodeLens-instances.', (value, _args, converter) => {
|
||||
// new ApiCommandResult<languages.CodeLens[], vscode.CodeLens[] | undefined>('A promise that resolves to an array of VoidCodeLens-instances.', (value, _args, converter) => {
|
||||
// return tryMapWith<languages.CodeLens, vscode.CodeLens>(item => {
|
||||
// return new types.CodeLens(typeConverters.Range.to(item.range), item.command && converter.fromInternal(item.command));
|
||||
// })(value);
|
||||
// })
|
||||
// ),
|
||||
|
||||
// --- code actions
|
||||
new ApiCommand(
|
||||
'vscode.executeCodeActionProvider', '_executeCodeActionProvider', 'Execute code action provider.',
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
import { LineMageViewPane } from 'vs/workbench/contrib/linemage/browser/linemageViewPane'
|
||||
import { VoidViewPane } from 'vs/workbench/contrib/void/browser/voidViewPane'
|
||||
|
||||
import { Codicon } from 'vs/base/common/codicons';
|
||||
import { localize } from 'vs/nls';
|
||||
@ -18,22 +18,22 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
|
||||
|
||||
const linemageViewIcon = registerIcon('linemage-view-icon', Codicon.search, localize('linemageViewIcon', 'View icon of the linemage chat view.'));
|
||||
const voidViewIcon = registerIcon('void-view-icon', Codicon.search, localize('voidViewIcon', 'View icon of the Void chat view.'));
|
||||
|
||||
|
||||
// compare against search.contribution.ts and https://app.greptile.com/chat/w1nsmt3lauwzculipycpn?repo=github%3Amain%3Amicrosoft%2Fvscode
|
||||
// and debug.contribution.ts, scm.contribution.ts (source control)
|
||||
|
||||
const VIEW_CONTAINER_ID = 'workbench.view.linemage' // called VIEWLET_ID in other places for some reason
|
||||
const VIEW_CONTAINER_ID = 'workbench.view.void' // called VIEWLET_ID in other places for some reason
|
||||
|
||||
// Register view container
|
||||
const viewContainerRegistry = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry);
|
||||
const viewContainer = viewContainerRegistry.registerViewContainer({
|
||||
id: VIEW_CONTAINER_ID,
|
||||
title: nls.localize2('linemage', 'LineMage'), // this is used to say LineMage (Ctrl + L)
|
||||
title: nls.localize2('void', 'Void'), // this is used to say "Void" (Ctrl + L)
|
||||
ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [VIEW_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true }]),
|
||||
hideIfEmpty: false,
|
||||
icon: linemageViewIcon,
|
||||
icon: voidViewIcon,
|
||||
order: 1,
|
||||
}, ViewContainerLocation.AuxiliaryBar, { doNotRegisterOpenCommand: true });
|
||||
|
||||
@ -45,9 +45,9 @@ const viewContainer = viewContainerRegistry.registerViewContainer({
|
||||
const VIEW_ID = VIEW_CONTAINER_ID // not sure if we can change this
|
||||
const viewDescriptor: IViewDescriptor = {
|
||||
id: VIEW_ID,
|
||||
containerIcon: linemageViewIcon,
|
||||
name: nls.localize2('linemage chat', "Chat"), // this says ... : CHAT
|
||||
ctorDescriptor: new SyncDescriptor(LineMageViewPane),
|
||||
containerIcon: voidViewIcon,
|
||||
name: nls.localize2('void chat', "Chat"), // this says ... : CHAT
|
||||
ctorDescriptor: new SyncDescriptor(VoidViewPane),
|
||||
canToggleVisibility: false,
|
||||
canMoveView: true,
|
||||
openCommandActionDescriptor: {
|
||||
|
@ -16,7 +16,7 @@ import { ViewPane } from 'vs/workbench/browser/parts/views/viewPane';
|
||||
// import { IHoverService } from 'vs/platform/hover/browser/hover';
|
||||
|
||||
|
||||
export class LineMageViewPane extends ViewPane {
|
||||
export class VoidViewPane extends ViewPane {
|
||||
|
||||
// constructor(
|
||||
// options: IViewPaneOptions,
|
||||
|
@ -3,8 +3,8 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//#region --- linemage
|
||||
import 'vs/workbench/contrib/linemage/browser/linemage.contribution'
|
||||
//#region --- void
|
||||
import 'vs/workbench/contrib/void/browser/void.contribution'
|
||||
//#endregion
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user