## 1.113.0
This commit is contained in:
parent
5269b0db43
commit
ca9375d25d
@ -194,3 +194,8 @@ None
|
|||||||
-----------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
- Added Cost of Delay (CoD)
|
- Added Cost of Delay (CoD)
|
||||||
|
|
||||||
|
## 1.113.0 1739287994496 = 638748847944960000 = 2025-0.Winter = Tue Feb 11 2025 08:33:14 GMT-0700 (Mountain Standard Time)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Add Code Insiders lines when not present
|
||||||
|
@ -275,5 +275,5 @@
|
|||||||
"webpack": "webpack --config ./build/node-extension.webpack.config.js",
|
"webpack": "webpack --config ./build/node-extension.webpack.config.js",
|
||||||
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\""
|
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\""
|
||||||
},
|
},
|
||||||
"version": "1.112.0"
|
"version": "1.113.0"
|
||||||
}
|
}
|
@ -7,6 +7,50 @@ export function refreshBoth(extensionContext: vscode.ExtensionContext): any {
|
|||||||
setTimeout(() => { vscode.commands.executeCommand("workbench.action.webview.openDeveloperTools"); }, 500);
|
setTimeout(() => { vscode.commands.executeCommand("workbench.action.webview.openDeveloperTools"); }, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function updateWithLogic(textDocument: vscode.TextDocument) {
|
||||||
|
await vscode.window.showTextDocument(textDocument);
|
||||||
|
const textEditor = vscode.window.activeTextEditor;
|
||||||
|
if (!textEditor) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const now: Date = new Date();
|
||||||
|
const time: number = now.getTime();
|
||||||
|
const year: number = now.getFullYear();
|
||||||
|
const start: Date = new Date(year, 0, 0);
|
||||||
|
const oneDay: number = 1000 * 60 * 60 * 24;
|
||||||
|
const timezoneOffset: number = now.getTimezoneOffset();
|
||||||
|
let segments: string[] = textDocument.fileName.split('\\');
|
||||||
|
const diff: number = (time - start.getTime()) + ((start.getTimezoneOffset() - timezoneOffset) * 60 * 1000);
|
||||||
|
const day: number = Math.floor(diff / oneDay);
|
||||||
|
const seconds: number = time.valueOf() + timezoneOffset;
|
||||||
|
let notLastThree: string[] = segments.slice(0, -3);
|
||||||
|
let season: string = year + "-";
|
||||||
|
if (day < 78) {
|
||||||
|
season += "0.Winter";
|
||||||
|
} else if (day < 124) {
|
||||||
|
season += "1.Spring";
|
||||||
|
} else if (day < 171) {
|
||||||
|
season += "2.Spring";
|
||||||
|
} else if (day < 217) {
|
||||||
|
season += "3.Summer";
|
||||||
|
} else if (day < 264) {
|
||||||
|
season += "4.Summer";
|
||||||
|
} else if (day < 309) {
|
||||||
|
season += "5.Fall";
|
||||||
|
} else if (day < 354) {
|
||||||
|
season += "6.Fall";
|
||||||
|
} else {
|
||||||
|
season += "7.Winter";
|
||||||
|
}
|
||||||
|
let path: string = notLastThree.join('\\') + `\\${year}\\${season}\\${seconds}`;
|
||||||
|
const uri = vscode.Uri.parse(path);
|
||||||
|
textEditor.edit(editBuilder => {
|
||||||
|
let text: string = `\r\n## Code Insiders\r\n\r\n- [code-insiders](${path})\r\n\r\n## Sub-tasks\r\n\r\n- [ ] To do`;
|
||||||
|
let position: vscode.Position = new vscode.Position(textDocument.lineCount, 0);
|
||||||
|
editBuilder.insert(position, text);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function openInNewWindowLogic(): Promise<any> {
|
async function openInNewWindowLogic(): Promise<any> {
|
||||||
if (vscode.workspace.workspaceFolders === undefined) {
|
if (vscode.workspace.workspaceFolders === undefined) {
|
||||||
vscode.window.showInformationMessage("Open workspace first!");
|
vscode.window.showInformationMessage("Open workspace first!");
|
||||||
@ -25,27 +69,34 @@ async function openInNewWindowLogic(): Promise<any> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (let i = 0; i < fileUris.length; ++i) {
|
for (let i = 0; i < fileUris.length; ++i) {
|
||||||
|
let found: boolean = false;
|
||||||
const textDocument: vscode.TextDocument = await vscode.workspace.openTextDocument(fileUris[i]);
|
const textDocument: vscode.TextDocument = await vscode.workspace.openTextDocument(fileUris[i]);
|
||||||
for (let j = 0; j < textDocument.lineCount; ++j) {
|
for (let j = 0; j < textDocument.lineCount; ++j) {
|
||||||
const text = textDocument.lineAt(j).text;
|
const text = textDocument.lineAt(j).text;
|
||||||
if (text.endsWith(')')) {
|
if (text.endsWith(')')) {
|
||||||
if (text.startsWith("- [code](")) {
|
if (text.startsWith("- [code](")) {
|
||||||
|
found = true;
|
||||||
const uri = vscode.Uri.parse("file:" + text.substring(9, text.length - 1));
|
const uri = vscode.Uri.parse("file:" + text.substring(9, text.length - 1));
|
||||||
await vscode.commands.executeCommand('vscode.openFolder', uri, true);
|
await vscode.commands.executeCommand('vscode.openFolder', uri, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (text.startsWith("- [codium](")) {
|
if (text.startsWith("- [codium](")) {
|
||||||
|
found = true;
|
||||||
const uri = vscode.Uri.parse("file:" + text.substring(11, text.length - 1));
|
const uri = vscode.Uri.parse("file:" + text.substring(11, text.length - 1));
|
||||||
await vscode.commands.executeCommand('vscode.openFolder', uri, true);
|
await vscode.commands.executeCommand('vscode.openFolder', uri, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (text.startsWith("- [code-insiders](")) {
|
if (text.startsWith("- [code-insiders](")) {
|
||||||
|
found = true;
|
||||||
const uri = vscode.Uri.parse("file:" + text.substring(18, text.length - 1));
|
const uri = vscode.Uri.parse("file:" + text.substring(18, text.length - 1));
|
||||||
await vscode.commands.executeCommand('vscode.openFolder', uri, true);
|
await vscode.commands.executeCommand('vscode.openFolder', uri, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!found) {
|
||||||
|
updateWithLogic(textDocument);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,20 +133,21 @@ function insertDateTimeLogic(): undefined {
|
|||||||
if (!textEditor) {
|
if (!textEditor) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const date = new Date();
|
|
||||||
const selection = textEditor.selection;
|
const selection = textEditor.selection;
|
||||||
textEditor.edit(editBuilder => {
|
textEditor.edit(editBuilder => {
|
||||||
var range;
|
var range;
|
||||||
const now: Date = new Date();
|
const now: Date = new Date();
|
||||||
|
const time: number = now.getTime();
|
||||||
|
const year: number = now.getFullYear();
|
||||||
|
const start: Date = new Date(year, 0, 0);
|
||||||
const oneDay: number = 1000 * 60 * 60 * 24;
|
const oneDay: number = 1000 * 60 * 60 * 24;
|
||||||
const start: Date = new Date(now.getFullYear(), 0, 0);
|
const timezoneOffset: number = now.getTimezoneOffset();
|
||||||
const diff: number = (now.getTime() - start.getTime()) + ((start.getTimezoneOffset() - now.getTimezoneOffset()) * 60 * 1000);
|
const diff: number = (time - start.getTime()) + ((start.getTimezoneOffset() - timezoneOffset) * 60 * 1000);
|
||||||
|
const seconds: number = time.valueOf() + timezoneOffset;
|
||||||
const day: number = Math.floor(diff / oneDay);
|
const day: number = Math.floor(diff / oneDay);
|
||||||
const timezoneOffset = now.getTimezoneOffset();
|
const epoch: number = seconds * 10000;
|
||||||
const seconds = now.getTime().valueOf() + timezoneOffset;
|
const ticks: number = epoch + 621355968000000000;
|
||||||
const epoch = seconds * 10000;
|
let season: string = year + "-";
|
||||||
const ticks = epoch + 621355968000000000;
|
|
||||||
let season: string = now.getFullYear() + "-";
|
|
||||||
if (day < 78) {
|
if (day < 78) {
|
||||||
season += "0.Winter";
|
season += "0.Winter";
|
||||||
} else if (day < 124) {
|
} else if (day < 124) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user