rename glass to LineMage

This commit is contained in:
Andrew 2024-09-10 21:22:34 -07:00
parent 93132a36e6
commit cfe968d024
15 changed files with 36 additions and 37 deletions

View file

@ -1,5 +1,5 @@
{ {
"name": "Code - OSS", "name": "LineMage",
"build": { "build": {
"dockerfile": "Dockerfile" "dockerfile": "Dockerfile"
}, },

View file

@ -13,7 +13,7 @@
], ],
"rules": { "rules": {
"constructor-super": "warn", "constructor-super": "warn",
"curly": "off", // <-- glass "curly": "off", // <-- LineMage
"eqeqeq": "warn", "eqeqeq": "warn",
"prefer-const": [ "prefer-const": [
"warn", "warn",
@ -51,7 +51,7 @@
"no-var": "warn", "no-var": "warn",
"jsdoc/no-types": "warn", "jsdoc/no-types": "warn",
"semi": "off", "semi": "off",
"@typescript-eslint/semi": "off", // <-- glass "@typescript-eslint/semi": "off", // <-- LineMage
"@typescript-eslint/member-delimiter-style": "warn", "@typescript-eslint/member-delimiter-style": "warn",
"@typescript-eslint/naming-convention": [ "@typescript-eslint/naming-convention": [
"warn", "warn",

View file

@ -93,7 +93,7 @@
} }
], ],
"git.ignoreLimitWarning": true, "git.ignoreLimitWarning": true,
// we removed this for glass: // we removed this for LineMage:
// "git.branchProtection": [ // "git.branchProtection": [
// "main", // "main",
// "distro", // "distro",

View file

@ -121,7 +121,7 @@ More ⭐'s = more important.
### Core ### Core
- Migrate the LineMage extension to live natively in VS Code. There's initial work here at `glass.contribution.ts`. - Migrate the LineMage extension to live natively in VS Code. There's initial work here at `linemage.contribution.ts`.
- Allow access to the VS Code extension marketplace. - Allow access to the VS Code extension marketplace.

View file

@ -264,7 +264,7 @@ function createGitIndexVinyls(paths) {
return pall(fns, { concurrency: 4 }).then((r) => r.filter((p) => !!p)); return pall(fns, { concurrency: 4 }).then((r) => r.filter((p) => !!p));
} }
// NO PRE COMMIT HOOKS!!!! for now... - glass team // NO PRE COMMIT HOOKS!!!! for now... - LineMage team
// // this allows us to run hygiene as a git pre-commit hook // // this allows us to run hygiene as a git pre-commit hook
// if (require.main === module) { // if (require.main === module) {

View file

@ -19,7 +19,7 @@
], ],
"workbench": [ "workbench": [
{ {
"name": "vs/workbench/contrib/glass", "name": "vs/workbench/contrib/linemage",
"project": "vscode-workbench" "project": "vscode-workbench"
}, },
{ {

View file

@ -7,7 +7,7 @@ const fs = require('fs');
// Complete list of directories where yarn should be executed to install node modules // Complete list of directories where yarn should be executed to install node modules
const dirs = [ const dirs = [
'extensions/helloworld', // <-- glass 'extensions/linemage', // <-- linemage
'', '',
'build', 'build',

View file

@ -138,7 +138,7 @@ export class ApprovalCodeLensProvider implements vscode.CodeLensProvider {
console.log('diffs after added:', this._diffsOfDocument[docUriStr]) console.log('diffs after added:', this._diffsOfDocument[docUriStr])
} }
// called on glass.approveApproval // called on myExtension.approveDiff
public async approveDiff({ diffid }: { diffid: number }) { public async approveDiff({ diffid }: { diffid: number }) {
const editor = vscode.window.activeTextEditor const editor = vscode.window.activeTextEditor
if (!editor) if (!editor)
@ -168,7 +168,7 @@ export class ApprovalCodeLensProvider implements vscode.CodeLensProvider {
} }
// called on glass.discardApproval // called on myExtension.discardDiff
public async discardDiff({ diffid }: { diffid: number }) { public async discardDiff({ diffid }: { diffid: number }) {
const editor = vscode.window.activeTextEditor const editor = vscode.window.activeTextEditor
if (!editor) if (!editor)
@ -180,7 +180,7 @@ export class ApprovalCodeLensProvider implements vscode.CodeLensProvider {
// get index of this diff in diffsOfDocument // get index of this diff in diffsOfDocument
const index = this._diffsOfDocument[docUriStr].findIndex(diff => diff.diffid === diffid); const index = this._diffsOfDocument[docUriStr].findIndex(diff => diff.diffid === diffid);
if (index === -1) { if (index === -1) {
console.error('Glass error: DiffID could not be found: ', diffid, this._diffsOfDocument[docUriStr]) console.error('LineMage error: DiffID could not be found: ', diffid, this._diffsOfDocument[docUriStr])
return return
} }

View file

@ -15,7 +15,7 @@ export type ApiConfig = {
githubPAT: string, githubPAT: string,
repoinfo: { repoinfo: {
remote: string, // e.g. 'github' remote: string, // e.g. 'github'
repository: string, // e.g. 'andrewpareles/glass_vscode' repository: string, // e.g. 'linemagedev/linemage'
branch: string // e.g. 'main' branch: string // e.g. 'main'
} }
}, },

View file

@ -1,6 +1,6 @@
{ {
"nameShort": "Glass", "nameShort": "LineMage",
"nameLong": "Glass", "nameLong": "LineMage",
"applicationName": "code-oss", "applicationName": "code-oss",
"dataFolderName": ".vscode-oss", "dataFolderName": ".vscode-oss",
"win32MutexName": "vscodeoss", "win32MutexName": "vscodeoss",

View file

@ -552,10 +552,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
}, },
// GLASS added this // LINEMAGE added this (I think will need to add this back when add ctrl+K)
registerGlassCtrlKProvider(selector: vscode.DocumentSelector, provider: vscode.CodeLensProvider): vscode.Disposable { // registerLineMageCtrlKProvider(selector: vscode.DocumentSelector, provider: vscode.CodeLensProvider): vscode.Disposable {
return extHostLanguageFeatures.registerCodeLensProvider(extension, checkSelector(selector), provider); // return extHostLanguageFeatures.registerCodeLensProvider(extension, checkSelector(selector), provider);
}, // },
registerDefinitionProvider(selector: vscode.DocumentSelector, provider: vscode.DefinitionProvider): vscode.Disposable { registerDefinitionProvider(selector: vscode.DocumentSelector, provider: vscode.DefinitionProvider): vscode.Disposable {

View file

@ -304,11 +304,11 @@ const newCommands: ApiCommand[] = [
})(value); })(value);
}) })
), ),
// // --- glass code lens // // --- LineMage code lens
// new ApiCommand( // new ApiCommand(
// 'vscode.executeGlassCodeLensProvider', '_executeGlassCodeLensProvider', 'Execute glass code lens provider.', // 'vscode.executeLineMageCodeLensProvider', '_executeLineMageCodeLensProvider', 'Execute LineMage 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()], // [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 GlassCodeLens-instances.', (value, _args, converter) => { // new ApiCommandResult<languages.CodeLens[], vscode.CodeLens[] | undefined>('A promise that resolves to an array of LineMageCodeLens-instances.', (value, _args, converter) => {
// return tryMapWith<languages.CodeLens, vscode.CodeLens>(item => { // return tryMapWith<languages.CodeLens, vscode.CodeLens>(item => {
// return new types.CodeLens(typeConverters.Range.to(item.range), item.command && converter.fromInternal(item.command)); // return new types.CodeLens(typeConverters.Range.to(item.range), item.command && converter.fromInternal(item.command));
// })(value); // })(value);

View file

@ -7,7 +7,7 @@ import {
import * as nls from 'vs/nls'; import * as nls from 'vs/nls';
import { GlassViewPane } from 'vs/workbench/contrib/glass/browser/glassViewPane' import { LineMageViewPane } from 'vs/workbench/contrib/linemage/browser/linemageViewPane'
import { Codicon } from 'vs/base/common/codicons'; import { Codicon } from 'vs/base/common/codicons';
import { localize } from 'vs/nls'; 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'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
const glassViewIcon = registerIcon('glass-view-icon', Codicon.search, localize('glassViewIcon', 'View icon of the glass chat view.')); const linemageViewIcon = registerIcon('linemage-view-icon', Codicon.search, localize('linemageViewIcon', 'View icon of the linemage chat view.'));
// compare against search.contribution.ts and https://app.greptile.com/chat/w1nsmt3lauwzculipycpn?repo=github%3Amain%3Amicrosoft%2Fvscode // 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) // and debug.contribution.ts, scm.contribution.ts (source control)
const VIEW_CONTAINER_ID = 'workbench.view.glass' // called VIEWLET_ID in other places for some reason const VIEW_CONTAINER_ID = 'workbench.view.linemage' // called VIEWLET_ID in other places for some reason
// Register view container // Register view container
const viewContainerRegistry = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry); const viewContainerRegistry = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry);
const viewContainer = viewContainerRegistry.registerViewContainer({ const viewContainer = viewContainerRegistry.registerViewContainer({
id: VIEW_CONTAINER_ID, id: VIEW_CONTAINER_ID,
title: nls.localize2('glass', 'Glass'), // this is used to say GLASS (Ctrl + L) title: nls.localize2('linemage', 'LineMage'), // this is used to say LineMage (Ctrl + L)
ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [VIEW_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true }]), ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [VIEW_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true }]),
hideIfEmpty: false, hideIfEmpty: false,
icon: glassViewIcon, icon: linemageViewIcon,
order: 1, order: 1,
}, ViewContainerLocation.AuxiliaryBar, { doNotRegisterOpenCommand: true }); }, ViewContainerLocation.AuxiliaryBar, { doNotRegisterOpenCommand: true });
@ -45,10 +45,9 @@ const viewContainer = viewContainerRegistry.registerViewContainer({
const VIEW_ID = VIEW_CONTAINER_ID // not sure if we can change this const VIEW_ID = VIEW_CONTAINER_ID // not sure if we can change this
const viewDescriptor: IViewDescriptor = { const viewDescriptor: IViewDescriptor = {
id: VIEW_ID, id: VIEW_ID,
containerIcon: glassViewIcon, containerIcon: linemageViewIcon,
name: nls.localize2('glass chat', "Chat"), // this says : CHAT name: nls.localize2('linemage chat', "Chat"), // this says ... : CHAT
// ctorDescriptor: new SyncDescriptor(GlassViewPane), ctorDescriptor: new SyncDescriptor(LineMageViewPane),
ctorDescriptor: new SyncDescriptor(GlassViewPane),
canToggleVisibility: false, canToggleVisibility: false,
canMoveView: true, canMoveView: true,
openCommandActionDescriptor: { openCommandActionDescriptor: {

View file

@ -16,7 +16,7 @@ import { ViewPane } from 'vs/workbench/browser/parts/views/viewPane';
// import { IHoverService } from 'vs/platform/hover/browser/hover'; // import { IHoverService } from 'vs/platform/hover/browser/hover';
export class GlassViewPane extends ViewPane { export class LineMageViewPane extends ViewPane {
// constructor( // constructor(
// options: IViewPaneOptions, // options: IViewPaneOptions,
@ -36,4 +36,4 @@ export class GlassViewPane extends ViewPane {
} }
// register a singleton service that // register a singleton service that mounts the ViewPane here

View file

@ -3,8 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
//#region --- glass //#region --- linemage
import 'vs/workbench/contrib/glass/browser/glass.contribution' import 'vs/workbench/contrib/linemage/browser/linemage.contribution'
//#endregion //#endregion