Update .gitignore and README.md for CODESYS MCP project. Added entries to .gitignore for VSIX files and VS Code settings. Expanded README to include architecture, components, deployment instructions, and details about the Cursor extension.
This commit is contained in:
15
vscode_codesys_companion/src/state.ts
Normal file
15
vscode_codesys_companion/src/state.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as vscode from "vscode";
|
||||
|
||||
const ACTIVE_PROJECT_KEY = "codesys.activeProjectPath";
|
||||
|
||||
export class ExtensionState {
|
||||
constructor(private readonly context: vscode.ExtensionContext) {}
|
||||
|
||||
public get activeProjectPath(): string {
|
||||
return this.context.globalState.get<string>(ACTIVE_PROJECT_KEY, "");
|
||||
}
|
||||
|
||||
public async setActiveProjectPath(path: string): Promise<void> {
|
||||
await this.context.globalState.update(ACTIVE_PROJECT_KEY, path);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user