Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,11 @@ dist

# IDE
.idea
src/.vscode/
src/.vscode/

# AI MCPs and settings
.serena/
.cursor/
.taskmaster/
.claude/
.kiro/
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 76 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"@views": "dist/src/views",
"@vscommands": "dist/src/vscommands"
},
"activationEvents": [],
"activationEvents": [
"onStartupFinished"
],
"contributes": {
"commands": [
{
Expand Down Expand Up @@ -76,6 +78,26 @@
"light": "resources/sidebar/icons/light/rocket.svg"
},
"title": "autokitteh: Run Project"
},
{
"command": "autokitteh.autoSave.enable",
"title": "AutoKitteh: Enable Auto-Save"
},
{
"command": "autokitteh.autoSave.disable",
"title": "AutoKitteh: Disable Auto-Save"
},
{
"command": "autokitteh.autoSave.cancelPending",
"title": "AutoKitteh: Cancel Pending Saves"
},
{
"command": "autokitteh.autoSave.flushAll",
"title": "AutoKitteh: Flush All Saves"
},
{
"command": "autokitteh.autoSave.showLogs",
"title": "AutoKitteh: Show Auto-Save Logs"
}
],
"configuration": {
Expand Down Expand Up @@ -135,6 +157,58 @@
"default": false,
"description": "Is extension ON",
"type": "hidden"
},
"autokitteh.autoSave.enabled": {
"type": "boolean",
"default": true,
"description": "Enable AutoKitteh auto-save for workspace files."
},
"autokitteh.autoSave.mode": {
"type": "string",
"enum": [
"inherit",
"afterDelay",
"onFocusChange",
"onWindowChange"
],
"default": "afterDelay",
"description": "Auto-save mode."
},
"autokitteh.autoSave.delayMs": {
"type": "number",
"minimum": 100,
"maximum": 10000,
"default": 750,
"description": "Debounce delay in milliseconds for afterDelay mode."
},
"autokitteh.autoSave.includeGlobs": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Glob patterns to include for auto-save scope."
},
"autokitteh.autoSave.excludeGlobs": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"**/.git/**",
"**/node_modules/**",
"**/.next/**",
"**/dist/**",
"**/.cache/**"
],
"description": "Glob patterns to exclude from auto-save."
},
"autokitteh.autoSave.maxFileSizeKb": {
"type": "number",
"minimum": 1,
"maximum": 8192,
"default": 49,
"description": "Skip or adjust debounce for files larger than this size."
}
},
"title": "autokitteh"
Expand Down Expand Up @@ -293,6 +367,7 @@
"cross-spawn": "^7.0.3",
"i18next": "^23.11.4",
"lodash.isequal": "^4.5.0",
"minimatch": "^9.0.3",
"module-alias": "^2.2.3",
"moment": "^2.30.1",
"react-lottie-loader": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/autokitteh
Submodule autokitteh updated 102 files
42 changes: 42 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { AppStateHandler } from "@controllers/utilities/appStateHandler";
import eventEmitter from "@eventEmitter";
import { translate } from "@i18n";
import { AuthService, LoggerService, OrganizationsService } from "@services";
import { AutoSaveService, DebounceManager, ProjectMapper } from "@services/autoSave";
import { Organization } from "@type/models";
import { SidebarTreeItem } from "@type/views";
import { ValidateURL, WorkspaceConfig } from "@utilities";
Expand All @@ -19,6 +20,7 @@ import { openBaseURLInputDialog, openWalkthrough } from "@vscommands/walkthrough
let sidebarController: SidebarController | null = null;
let tabsManager: TabsManagerController | null = null;
let organizations: Organization[] | undefined = undefined;
let autoSaveService: AutoSaveService | null = null;

export async function activate(context: ExtensionContext) {
context.subscriptions.push(
Expand Down Expand Up @@ -327,6 +329,43 @@ export async function activate(context: ExtensionContext) {
return;
}
commands.executeCommand(vsCommands.enable);

const debounceManager = new DebounceManager(10);
const projectMapper = new ProjectMapper();
const statusBar = window.createStatusBarItem();
const outputChannel = window.createOutputChannel("AutoKitteh Auto-Save");

autoSaveService = new AutoSaveService(debounceManager, projectMapper, statusBar, outputChannel);

context.subscriptions.push(
commands.registerCommand("autokitteh.autoSave.enable", async () => {
await workspace.getConfiguration("autokitteh.autoSave").update("enabled", true, ConfigurationTarget.Workspace);
})
);

context.subscriptions.push(
commands.registerCommand("autokitteh.autoSave.disable", async () => {
await workspace.getConfiguration("autokitteh.autoSave").update("enabled", false, ConfigurationTarget.Workspace);
})
);

context.subscriptions.push(
commands.registerCommand("autokitteh.autoSave.cancelPending", async () => {
await autoSaveService?.cancelPending();
})
);

context.subscriptions.push(
commands.registerCommand("autokitteh.autoSave.flushAll", async () => {
await autoSaveService?.flushAll();
})
);

context.subscriptions.push(
commands.registerCommand("autokitteh.autoSave.showLogs", () => {
autoSaveService?.showLogs();
})
);
}
export function deactivate() {
if (sidebarController) {
Expand All @@ -335,4 +374,7 @@ export function deactivate() {
if (tabsManager) {
tabsManager.dispose();
}
if (autoSaveService) {
autoSaveService.dispose();
}
}
Loading