@selesai/code 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -1
- package/dist/config.js.map +1 -1
- package/dist/core/git-command.d.ts +9 -0
- package/dist/core/git-command.d.ts.map +1 -0
- package/dist/core/git-command.js +49 -0
- package/dist/core/git-command.js.map +1 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/defaults/models.json +18 -0
- package/dist/extensions/handoff-new.test.ts +210 -0
- package/dist/extensions/handoff-new.ts +172 -0
- package/dist/extensions/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/dist/extensions/package.json +1 -0
- package/dist/extensions/test-resolve-hook-impl.mjs +7 -0
- package/dist/extensions/test-resolve-hook.mjs +7 -0
- package/dist/extensions/workflow/adapter.ts +162 -6
- package/dist/extensions/workflow/modes/prototype.ts +42 -17
- package/dist/extensions/workflow/modes/quick.ts +40 -17
- package/dist/extensions/workflow/state-machine.ts +117 -15
- package/dist/extensions/workflow/validators.ts +42 -0
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +31 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +23 -8
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/skills/improve-codebase/SKILL.md +2 -2
- package/dist/utils/version-check.d.ts +3 -0
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +19 -0
- package/dist/utils/version-check.js.map +1 -1
- package/docs/workflows.md +21 -24
- package/package.json +5 -5
|
@@ -21,6 +21,7 @@ import { DefaultPackageManager } from "../../core/package-manager.js";
|
|
|
21
21
|
import { BUILT_IN_PROVIDER_DISPLAY_NAMES } from "../../core/provider-display-names.js";
|
|
22
22
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
23
23
|
import { SessionManager } from "../../core/session-manager.js";
|
|
24
|
+
import { buildGitCommandPrompt, GIT_COMMAND_MODES } from "../../core/git-command.js";
|
|
24
25
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
25
26
|
import { isInstallTelemetryEnabled } from "../../core/telemetry.js";
|
|
26
27
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
@@ -344,6 +345,16 @@ export class InteractiveMode {
|
|
|
344
345
|
}));
|
|
345
346
|
};
|
|
346
347
|
}
|
|
348
|
+
const gitCommand = slashCommands.find((command) => command.name === "git");
|
|
349
|
+
if (gitCommand) {
|
|
350
|
+
gitCommand.getArgumentCompletions = (prefix) => {
|
|
351
|
+
const lowerPrefix = prefix.toLowerCase();
|
|
352
|
+
const items = GIT_COMMAND_MODES.filter((mode) => [mode.name, ...mode.aliases].some((name) => name.toLowerCase().startsWith(lowerPrefix)));
|
|
353
|
+
return items.length > 0
|
|
354
|
+
? items.map((mode) => ({ value: mode.name, label: mode.name, description: mode.description }))
|
|
355
|
+
: null;
|
|
356
|
+
};
|
|
357
|
+
}
|
|
347
358
|
// Convert prompt templates to SlashCommand format for autocomplete
|
|
348
359
|
const templateCommands = this.session.promptTemplates.map((cmd) => ({
|
|
349
360
|
name: cmd.name,
|
|
@@ -2049,6 +2060,22 @@ export class InteractiveMode {
|
|
|
2049
2060
|
this.pendingInputImages = [];
|
|
2050
2061
|
return images;
|
|
2051
2062
|
}
|
|
2063
|
+
async handleGitCommand(text, images) {
|
|
2064
|
+
const prompt = buildGitCommandPrompt(text.slice(4).trim());
|
|
2065
|
+
this.editor.addToHistory?.(text);
|
|
2066
|
+
this.editor.setText("");
|
|
2067
|
+
if (this.session.isCompacting) {
|
|
2068
|
+
this.queueCompactionMessage(prompt, "steer", images);
|
|
2069
|
+
return;
|
|
2070
|
+
}
|
|
2071
|
+
if (this.session.isStreaming) {
|
|
2072
|
+
await this.session.prompt(prompt, { streamingBehavior: "steer", images });
|
|
2073
|
+
this.updatePendingMessagesDisplay();
|
|
2074
|
+
this.ui.requestRender();
|
|
2075
|
+
return;
|
|
2076
|
+
}
|
|
2077
|
+
await this.session.prompt(prompt, { images });
|
|
2078
|
+
}
|
|
2052
2079
|
setupEditorSubmitHandler() {
|
|
2053
2080
|
this.defaultEditor.onSubmit = async (text) => {
|
|
2054
2081
|
text = text.trim();
|
|
@@ -2112,6 +2139,10 @@ export class InteractiveMode {
|
|
|
2112
2139
|
this.editor.setText("");
|
|
2113
2140
|
return;
|
|
2114
2141
|
}
|
|
2142
|
+
if (text === "/git" || text.startsWith("/git ")) {
|
|
2143
|
+
await this.handleGitCommand(text, images);
|
|
2144
|
+
return;
|
|
2145
|
+
}
|
|
2115
2146
|
if (text === "/fork") {
|
|
2116
2147
|
this.showUserMessageSelector();
|
|
2117
2148
|
this.editor.setText("");
|