apex-code 0.0.1-alpha.3 → 0.0.1-alpha.5
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/CHANGELOG.md +91 -0
- package/README.md +7 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +9 -0
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +2 -2
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +20 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +91 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +17 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +10 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/lsp/client.d.ts +76 -0
- package/dist/core/lsp/client.d.ts.map +1 -0
- package/dist/core/lsp/client.js +469 -0
- package/dist/core/lsp/client.js.map +1 -0
- package/dist/core/lsp/diagnostics.d.ts +47 -0
- package/dist/core/lsp/diagnostics.d.ts.map +1 -0
- package/dist/core/lsp/diagnostics.js +224 -0
- package/dist/core/lsp/diagnostics.js.map +1 -0
- package/dist/core/lsp/pool.d.ts +48 -0
- package/dist/core/lsp/pool.d.ts.map +1 -0
- package/dist/core/lsp/pool.js +150 -0
- package/dist/core/lsp/pool.js.map +1 -0
- package/dist/core/lsp/registry.d.ts +49 -0
- package/dist/core/lsp/registry.d.ts.map +1 -0
- package/dist/core/lsp/registry.js +215 -0
- package/dist/core/lsp/registry.js.map +1 -0
- package/dist/core/lsp/status.d.ts +23 -0
- package/dist/core/lsp/status.d.ts.map +1 -0
- package/dist/core/lsp/status.js +35 -0
- package/dist/core/lsp/status.js.map +1 -0
- package/dist/core/lsp/sync.d.ts +13 -0
- package/dist/core/lsp/sync.d.ts.map +1 -0
- package/dist/core/lsp/sync.js +71 -0
- package/dist/core/lsp/sync.js.map +1 -0
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/sandbox/child-entry.d.ts.map +1 -1
- package/dist/core/sandbox/child-entry.js +4 -0
- package/dist/core/sandbox/child-entry.js.map +1 -1
- package/dist/core/sandbox/cli-launch.d.ts +10 -1
- package/dist/core/sandbox/cli-launch.d.ts.map +1 -1
- package/dist/core/sandbox/cli-launch.js +50 -4
- package/dist/core/sandbox/cli-launch.js.map +1 -1
- package/dist/core/sandbox/cli-supervisor.d.ts +2 -0
- package/dist/core/sandbox/cli-supervisor.d.ts.map +1 -1
- package/dist/core/sandbox/cli-supervisor.js +1 -0
- package/dist/core/sandbox/cli-supervisor.js.map +1 -1
- package/dist/core/sandbox/default-hosts.d.ts +28 -0
- package/dist/core/sandbox/default-hosts.d.ts.map +1 -0
- package/dist/core/sandbox/default-hosts.js +69 -0
- package/dist/core/sandbox/default-hosts.js.map +1 -0
- package/dist/core/sandbox/linux-backend.d.ts +16 -0
- package/dist/core/sandbox/linux-backend.d.ts.map +1 -1
- package/dist/core/sandbox/linux-backend.js +56 -10
- package/dist/core/sandbox/linux-backend.js.map +1 -1
- package/dist/core/sandbox/macos-backend.d.ts +7 -0
- package/dist/core/sandbox/macos-backend.d.ts.map +1 -1
- package/dist/core/sandbox/macos-backend.js +17 -9
- package/dist/core/sandbox/macos-backend.js.map +1 -1
- package/dist/core/sandbox/network-refusal.d.ts +24 -0
- package/dist/core/sandbox/network-refusal.d.ts.map +1 -0
- package/dist/core/sandbox/network-refusal.js +72 -0
- package/dist/core/sandbox/network-refusal.js.map +1 -0
- package/dist/core/sandbox/supervisor.d.ts +9 -0
- package/dist/core/sandbox/supervisor.d.ts.map +1 -1
- package/dist/core/sandbox/supervisor.js.map +1 -1
- package/dist/core/sdk.d.ts +4 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +10 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-share.d.ts +15 -0
- package/dist/core/session-share.d.ts.map +1 -1
- package/dist/core/session-share.js +23 -0
- package/dist/core/session-share.js.map +1 -1
- package/dist/core/settings-manager.d.ts +8 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +3 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/tools/contract.d.ts +29 -2
- package/dist/core/tools/contract.d.ts.map +1 -1
- package/dist/core/tools/contract.js.map +1 -1
- package/dist/core/tools/diagnostics.d.ts +39 -0
- package/dist/core/tools/diagnostics.d.ts.map +1 -0
- package/dist/core/tools/diagnostics.js +62 -0
- package/dist/core/tools/diagnostics.js.map +1 -0
- package/dist/core/tools/edit.d.ts +10 -0
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +17 -8
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/index.d.ts +15 -2
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +6 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/lsp.d.ts +62 -0
- package/dist/core/tools/lsp.d.ts.map +1 -0
- package/dist/core/tools/lsp.js +216 -0
- package/dist/core/tools/lsp.js.map +1 -0
- package/dist/core/tools/write.d.ts +10 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +16 -3
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +49 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +235 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +2 -1
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/splash-header.d.ts +41 -0
- package/dist/modes/interactive/components/splash-header.d.ts.map +1 -0
- package/dist/modes/interactive/components/splash-header.js +145 -0
- package/dist/modes/interactive/components/splash-header.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +20 -17
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/apex.json +94 -0
- package/dist/modes/interactive/theme/light.json +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +6 -1
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/themes/apex-logo.d.ts +21 -0
- package/dist/themes/apex-logo.d.ts.map +1 -0
- package/dist/themes/apex-logo.js +31 -0
- package/dist/themes/apex-logo.js.map +1 -0
- package/dist/utils/changelog.d.ts +7 -2
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +82 -13
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +28 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +68 -5
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +2 -0
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +2 -0
- package/dist/utils/version-check.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/npm-shrinkwrap.json +5 -5
- package/package.json +2 -2
|
@@ -25,7 +25,7 @@ import { aggregateUsagePerformance } from "../../core/observability/aggregate.js
|
|
|
25
25
|
import { DefaultPackageManager } from "../../core/package-manager.js";
|
|
26
26
|
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
|
|
27
27
|
import { SessionManager, sessionEntryToContextMessages } from "../../core/session-manager.js";
|
|
28
|
-
import { publishSessionShare } from "../../core/session-share.js";
|
|
28
|
+
import { formatShareUnavailableMessage, publishSessionShare } from "../../core/session-share.js";
|
|
29
29
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
30
30
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
31
31
|
import { getUsageCostBreakdown } from "../../core/usage-totals.js";
|
|
@@ -63,6 +63,7 @@ import { ScopedModelsSelectorComponent } from "./components/scoped-models-select
|
|
|
63
63
|
import { SessionSelectorComponent } from "./components/session-selector.js";
|
|
64
64
|
import { SettingsSelectorComponent } from "./components/settings-selector.js";
|
|
65
65
|
import { SkillInvocationMessageComponent } from "./components/skill-invocation-message.js";
|
|
66
|
+
import { ApexSplashHeader } from "./components/splash-header.js";
|
|
66
67
|
import { BranchSummaryStatusIndicator, CompactionStatusIndicator, IdleStatus, RetryStatusIndicator, WorkingStatusIndicator, } from "./components/status-indicator.js";
|
|
67
68
|
import { ToolExecutionComponent } from "./components/tool-execution.js";
|
|
68
69
|
import { TreeSelectorComponent } from "./components/tree-selector.js";
|
|
@@ -362,6 +363,11 @@ export class InteractiveMode {
|
|
|
362
363
|
this.defaultEditor = new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {
|
|
363
364
|
paddingX: editorPaddingX,
|
|
364
365
|
autocompleteMaxVisible,
|
|
366
|
+
promptPrefix: "> ",
|
|
367
|
+
promptColor: (text) => theme.fg("accent", text),
|
|
368
|
+
placeholder: "Ask anything, / for commands, ! for bash",
|
|
369
|
+
placeholderColor: (text) => theme.fg("dim", text),
|
|
370
|
+
commandColor: (text) => theme.fg("accent", text),
|
|
365
371
|
});
|
|
366
372
|
this.editor = this.defaultEditor;
|
|
367
373
|
this.editorContainer = new Container();
|
|
@@ -517,7 +523,7 @@ export class InteractiveMode {
|
|
|
517
523
|
}
|
|
518
524
|
this.chatContainer.addChild(new DynamicBorder());
|
|
519
525
|
if (this.settingsManager.getCollapseChangelog()) {
|
|
520
|
-
const versionMatch = this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/);
|
|
526
|
+
const versionMatch = this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+(?:-[0-9A-Za-z][0-9A-Za-z.-]*)?)\]?/);
|
|
521
527
|
const latestVersion = versionMatch ? versionMatch[1] : this.version;
|
|
522
528
|
const condensedText = `Updated to v${latestVersion}. Use ${theme.bold("/changelog")} to view full changelog.`;
|
|
523
529
|
this.chatContainer.addChild(new Text(condensedText, 1, 0));
|
|
@@ -657,11 +663,14 @@ export class InteractiveMode {
|
|
|
657
663
|
this.ui.start();
|
|
658
664
|
this.isInitialized = true;
|
|
659
665
|
await this.themeController.applyFromSettings();
|
|
660
|
-
//
|
|
666
|
+
// Brand splash: mark on the left, runtime metadata on the right. The model
|
|
667
|
+
// and cwd are read through live getters, so they fill in once the session
|
|
668
|
+
// binds in rebindCurrentSession below.
|
|
661
669
|
if (this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
662
|
-
const logo = theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
|
|
663
670
|
// Build startup instructions using keybinding hint helpers
|
|
664
671
|
const hint = (keybinding, description) => keyHint(keybinding, description);
|
|
672
|
+
// The full cheatsheet is verbose-only. The default screen leads with the
|
|
673
|
+
// mark and the runtime facts that actually differ between launches.
|
|
665
674
|
const expandedInstructions = [
|
|
666
675
|
hint("app.interrupt", "to interrupt"),
|
|
667
676
|
hint("app.clear", "to clear"),
|
|
@@ -683,18 +692,12 @@ export class InteractiveMode {
|
|
|
683
692
|
hint("app.clipboard.pasteImage", "to paste image (with text fallback)"),
|
|
684
693
|
rawKeyHint("drop files", "to attach"),
|
|
685
694
|
].join("\n");
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
hint("app.tools.expand", "more"),
|
|
692
|
-
].join(theme.fg("muted", " · "));
|
|
693
|
-
const compactOnboarding = theme.fg("dim", `Press ${keyText("app.tools.expand")} to show full startup help and loaded resources.`);
|
|
694
|
-
const onboarding = theme.fg("dim", `Apex Code can explain its own features and look up its docs. Ask it how to use or extend Apex Code.`);
|
|
695
|
-
this.builtInHeader = new ExpandableText(() => `${logo}\n${compactInstructions}\n${compactOnboarding}\n\n${onboarding}`, () => `${logo}\n${expandedInstructions}\n\n${onboarding}`, this.getStartupExpansionState(), 1, 0);
|
|
695
|
+
this.builtInHeader = new ApexSplashHeader(this.version, () => this.session.state.model?.id, () => this.session.sessionManager.getCwd(), this.options.verbose ? expandedInstructions : undefined, {
|
|
696
|
+
topPadding: true,
|
|
697
|
+
getSymbolPreset: () => this.settingsManager.getSymbolPreset(),
|
|
698
|
+
getHint: () => "Apex Code can explain its own features and look up its docs.",
|
|
699
|
+
});
|
|
696
700
|
// Setup UI layout
|
|
697
|
-
this.headerContainer.addChild(new Spacer(1));
|
|
698
701
|
this.headerContainer.addChild(this.builtInHeader);
|
|
699
702
|
this.headerContainer.addChild(new Spacer(1));
|
|
700
703
|
}
|
|
@@ -4890,12 +4893,12 @@ export class InteractiveMode {
|
|
|
4890
4893
|
try {
|
|
4891
4894
|
const authResult = spawnSync("gh", ["auth", "status"], { encoding: "utf-8" });
|
|
4892
4895
|
if (authResult.status !== 0) {
|
|
4893
|
-
this.showError("
|
|
4896
|
+
this.showError(formatShareUnavailableMessage("unauthenticated"));
|
|
4894
4897
|
return;
|
|
4895
4898
|
}
|
|
4896
4899
|
}
|
|
4897
4900
|
catch {
|
|
4898
|
-
this.showError(
|
|
4901
|
+
this.showError(formatShareUnavailableMessage("missing"));
|
|
4899
4902
|
return;
|
|
4900
4903
|
}
|
|
4901
4904
|
let loader;
|