@bastani/atomic 0.9.25 → 0.9.26-alpha.2
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 +44 -0
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/OAUTH.md +1 -1
- package/dist/builtin/mcp/native-client-licenses/NOTICE +2 -2
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +6 -0
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +17 -0
- package/dist/builtin/workflows/src/index.js +15 -0
- package/dist/cli/args.js +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +4 -0
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +5 -1
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +1 -0
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-state.d.ts +14 -2
- package/dist/core/agent-session-state.d.ts.map +1 -1
- package/dist/core/agent-session-state.js +31 -6
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +5 -1
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/api-types.d.ts +2 -1
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +7 -0
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/provider-types.d.ts +2 -0
- package/dist/core/extensions/provider-types.d.ts.map +1 -1
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +4 -3
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts +2 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +3 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-runtime-streaming.d.ts +2 -1
- package/dist/core/model-runtime-streaming.d.ts.map +1 -1
- package/dist/core/model-runtime-streaming.js +4 -1
- package/dist/core/model-runtime-streaming.js.map +1 -1
- package/dist/core/model-runtime.d.ts +2 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +69 -5
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/oauth-login.d.ts +1 -0
- package/dist/core/oauth-login.d.ts.map +1 -1
- package/dist/core/oauth-login.js.map +1 -1
- package/dist/core/oauth-provider-metadata.d.ts.map +1 -1
- package/dist/core/oauth-provider-metadata.js +5 -17
- package/dist/core/oauth-provider-metadata.js.map +1 -1
- package/dist/core/provider-alias.d.ts +8 -0
- package/dist/core/provider-alias.d.ts.map +1 -0
- package/dist/core/provider-alias.js +119 -0
- package/dist/core/provider-alias.js.map +1 -0
- package/dist/core/provider-composer-internal.d.ts +1 -0
- package/dist/core/provider-composer-internal.d.ts.map +1 -1
- package/dist/core/provider-composer-internal.js.map +1 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +9 -0
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/sdk.js +2 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager-resource-accessors.d.ts +3 -3
- package/dist/core/settings-manager-resource-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-resource-accessors.js +2 -1
- package/dist/core/settings-manager-resource-accessors.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-types.d.ts +2 -1
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +133 -31
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +2 -1
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +25 -4
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/mcp/cli.js +2 -2
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/client/oauth/flow.d.ts +6 -0
- package/dist/extensions/mcp/client/oauth/flow.d.ts.map +1 -1
- package/dist/extensions/mcp/client/oauth/flow.js +23 -5
- package/dist/extensions/mcp/client/oauth/flow.js.map +1 -1
- package/dist/extensions/mcp/client/oauth/index.d.ts +1 -1
- package/dist/extensions/mcp/client/oauth/index.d.ts.map +1 -1
- package/dist/extensions/mcp/client/oauth/index.js +1 -1
- package/dist/extensions/mcp/client/oauth/index.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +22 -12
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +12 -7
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +58 -24
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/runtime.js +1 -1
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.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/main-session-options.d.ts.map +1 -1
- package/dist/main-session-options.js +6 -0
- package/dist/main-session-options.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/atomic-banner.d.ts +2 -0
- package/dist/modes/interactive/components/atomic-banner.d.ts.map +1 -1
- package/dist/modes/interactive/components/atomic-banner.js +9 -1
- package/dist/modes/interactive/components/atomic-banner.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +2 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +9 -4
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +3 -3
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +3 -3
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/components/startup-identity.js +2 -2
- package/dist/modes/interactive/components/startup-identity.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +3 -4
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +14 -5
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.js +38 -17
- package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +6 -4
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-resource-rendering.js +1 -1
- package/dist/modes/interactive/interactive-resource-rendering.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +2 -2
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +12 -4
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/login-provider-options.d.ts +2 -1
- package/dist/modes/interactive/login-provider-options.d.ts.map +1 -1
- package/dist/modes/interactive/login-provider-options.js +11 -6
- package/dist/modes/interactive/login-provider-options.js.map +1 -1
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/system-theme.js +10 -4
- package/dist/modes/interactive/theme/system-theme.js.map +1 -1
- package/docs/codemode.md +214 -0
- package/docs/custom-provider/oauth.md +2 -0
- package/docs/custom-provider/registration.md +32 -0
- package/docs/custom-provider.md +1 -0
- package/docs/docs.json +1 -0
- package/docs/extensions/api-reference.md +2 -0
- package/docs/getting-started/authentication.md +2 -2
- package/docs/guides.md +1 -1
- package/docs/mcp-servers.md +2 -0
- package/docs/providers.md +5 -3
- package/docs/reference/cli.md +1 -1
- package/docs/settings.md +1 -1
- package/docs/terminal-setup.md +2 -0
- package/docs/tools.md +1 -3
- package/docs/usage.md +1 -1
- package/examples/extensions/provider-accounts.ts +11 -0
- package/npm-shrinkwrap.json +68 -73
- package/package.json +8 -8
|
@@ -19,13 +19,26 @@ export function getBuiltinApiKeyLoginOptions(getDisplayName) {
|
|
|
19
19
|
authType: "api_key",
|
|
20
20
|
}));
|
|
21
21
|
}
|
|
22
|
+
function subscriptionFlag(isSubscription) {
|
|
23
|
+
return isSubscription === undefined ? {} : { subscription: isSubscription };
|
|
24
|
+
}
|
|
22
25
|
InteractiveModeBase.prototype.getLoginProviderOptions = function (authType) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
const oauthProviders = this.session.modelRuntime.getOAuthProviderMetadata();
|
|
27
|
+
const subscriptions = new Map(oauthProviders.map((provider) => [provider.id, provider.isSubscription]));
|
|
28
|
+
const options = oauthProviders.map((provider) => ({
|
|
29
|
+
id: provider.id,
|
|
30
|
+
name: provider.name,
|
|
31
|
+
authType: "oauth",
|
|
32
|
+
...subscriptionFlag(provider.isSubscription),
|
|
33
|
+
}));
|
|
26
34
|
for (const provider of this.session.modelRuntime.getProviders()) {
|
|
27
35
|
if (provider.auth.apiKey)
|
|
28
|
-
options.push({
|
|
36
|
+
options.push({
|
|
37
|
+
id: provider.id,
|
|
38
|
+
name: provider.name ?? provider.id,
|
|
39
|
+
authType: "api_key",
|
|
40
|
+
...subscriptionFlag(subscriptions.get(provider.id)),
|
|
41
|
+
});
|
|
29
42
|
}
|
|
30
43
|
return (authType ? options.filter((option) => option.authType === authType) : options).sort((a, b) => a.name.localeCompare(b.name));
|
|
31
44
|
};
|
|
@@ -33,27 +46,30 @@ InteractiveModeBase.prototype.getLogoutProviderOptions = function () {
|
|
|
33
46
|
const runtime = this.session.modelRuntime;
|
|
34
47
|
const providers = runtime.getProviders();
|
|
35
48
|
const providerNames = new Map(providers.map((provider) => [provider.id, provider.name ?? provider.id]));
|
|
36
|
-
|
|
49
|
+
const subscriptions = new Map();
|
|
50
|
+
for (const provider of runtime.getOAuthProviderMetadata()) {
|
|
37
51
|
providerNames.set(provider.id, provider.name);
|
|
52
|
+
subscriptions.set(provider.id, provider.isSubscription);
|
|
53
|
+
}
|
|
38
54
|
const options = [];
|
|
39
55
|
for (const [providerId, name] of providerNames) {
|
|
40
56
|
if (runtime.getProviderAuthStatus(providerId).source !== "stored")
|
|
41
57
|
continue;
|
|
42
58
|
const authType = runtime.getStoredCredentialType(providerId);
|
|
43
59
|
if (authType)
|
|
44
|
-
options.push({ id: providerId, name, authType });
|
|
60
|
+
options.push({ id: providerId, name, authType, ...subscriptionFlag(subscriptions.get(providerId)) });
|
|
45
61
|
}
|
|
46
62
|
return options.sort((a, b) => a.name.localeCompare(b.name));
|
|
47
63
|
};
|
|
48
|
-
InteractiveModeBase.prototype.startProviderLogin = async function (providerOption) {
|
|
64
|
+
InteractiveModeBase.prototype.startProviderLogin = async function (providerOption, onBack) {
|
|
49
65
|
if (providerOption.authType === "oauth") {
|
|
50
|
-
await this.showLoginDialog(providerOption.id, providerOption.name);
|
|
66
|
+
await this.showLoginDialog(providerOption.id, providerOption.name, onBack);
|
|
51
67
|
}
|
|
52
68
|
else if (providerOption.id === BEDROCK_PROVIDER_ID) {
|
|
53
|
-
this.showBedrockSetupDialog(providerOption.id, providerOption.name);
|
|
69
|
+
this.showBedrockSetupDialog(providerOption.id, providerOption.name, onBack);
|
|
54
70
|
}
|
|
55
71
|
else {
|
|
56
|
-
await this.showApiKeyLoginDialog(providerOption.id, providerOption.name);
|
|
72
|
+
await this.showApiKeyLoginDialog(providerOption.id, providerOption.name, onBack);
|
|
57
73
|
}
|
|
58
74
|
};
|
|
59
75
|
InteractiveModeBase.prototype.handleLoginCommand = async function (providerRef) {
|
|
@@ -73,7 +89,9 @@ InteractiveModeBase.prototype.handleLoginCommand = async function (providerRef)
|
|
|
73
89
|
}
|
|
74
90
|
};
|
|
75
91
|
InteractiveModeBase.prototype.showLoginAuthTypeSelector = function (providerOptions) {
|
|
76
|
-
const subscriptionLabel = "
|
|
92
|
+
const subscriptionLabel = providerOptions?.find((provider) => provider.authType === "oauth")?.subscription === false
|
|
93
|
+
? "Use an account"
|
|
94
|
+
: "Use a subscription";
|
|
77
95
|
const apiKeyLabel = "Use an API key";
|
|
78
96
|
const choices = providerOptions
|
|
79
97
|
? providerOptions.map((provider) => (provider.authType === "oauth" ? subscriptionLabel : apiKeyLabel))
|
|
@@ -83,10 +101,12 @@ InteractiveModeBase.prototype.showLoginAuthTypeSelector = function (providerOpti
|
|
|
83
101
|
done();
|
|
84
102
|
const authType = option === subscriptionLabel ? "oauth" : "api_key";
|
|
85
103
|
const directOption = providerOptions?.find((provider) => provider.authType === authType);
|
|
86
|
-
if (directOption)
|
|
87
|
-
void this.startProviderLogin(directOption);
|
|
88
|
-
|
|
104
|
+
if (directOption) {
|
|
105
|
+
void this.startProviderLogin(directOption, () => this.showLoginAuthTypeSelector(providerOptions));
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
89
108
|
this.showLoginProviderSelector(authType);
|
|
109
|
+
}
|
|
90
110
|
}, () => {
|
|
91
111
|
done();
|
|
92
112
|
this.ui.requestRender();
|
|
@@ -98,7 +118,7 @@ InteractiveModeBase.prototype.showLoginProviderSelector = function (authType, in
|
|
|
98
118
|
const providerOptions = this.getLoginProviderOptions(authType);
|
|
99
119
|
if (providerOptions.length === 0) {
|
|
100
120
|
const message = authType === "oauth"
|
|
101
|
-
? "No
|
|
121
|
+
? "No account providers available."
|
|
102
122
|
: authType === "api_key"
|
|
103
123
|
? "No API key providers available."
|
|
104
124
|
: "No login providers available.";
|
|
@@ -109,8 +129,9 @@ InteractiveModeBase.prototype.showLoginProviderSelector = function (authType, in
|
|
|
109
129
|
const selector = new OAuthSelectorComponent("login", this.session.modelRuntime, providerOptions, async (providerId, selectedAuthType) => {
|
|
110
130
|
done();
|
|
111
131
|
const providerOption = providerOptions.find((provider) => provider.id === providerId && provider.authType === selectedAuthType);
|
|
112
|
-
if (providerOption)
|
|
113
|
-
await this.startProviderLogin(providerOption);
|
|
132
|
+
if (providerOption) {
|
|
133
|
+
await this.startProviderLogin(providerOption, () => this.showLoginProviderSelector(authType, initialSearchInput));
|
|
134
|
+
}
|
|
114
135
|
}, () => {
|
|
115
136
|
done();
|
|
116
137
|
if (authType)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-auth-routing.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-auth-routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO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AAK,UAAU,IAAI,QAAQ,CAAC,QAAQ,KAAK,gBAAgB,CAClF,CAAC;YACF,IAAI,CAAC,cAAc;gBAAE,OAAO;YAC5B,IAAI,CAAC;gBACJ,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;gBACxE,MAAM,IAAI,CAAC,4BAA4B,EAAE,CAAC;gBAC1C,IAAI,CAAC,yBAAyB,EAAE,CAAC;gBACjC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;YACtG,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACzB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACvE,IAAI,CAAC,SAAS,CACb,KAAK,YAAY,8BAA8B;oBAC9C,CAAC,CAAC,2BAA2B,cAAc,CAAC,IAAI,sDAAsD,OAAO,EAAE;oBAC/G,CAAC,CAAC,kBAAkB,OAAO,EAAE,CAC9B,CAAC;YACH,CAAC;QACF,CAAC,EACD,GAAG,EAAE;YACJ,IAAI,EAAE,CAAC;YACP,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC;QACzB,CAAC,EACD,SAAS,EACT,kBAAkB,CAClB,CAAC;QACF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IACjD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { builtinProviders } from \"@bastani/pi-ai/providers/all\";\nimport { CredentialSynchronizationError } from \"../../core/model-runtime.js\";\nimport type { AuthStatus } from \"../../core/provider-composer.ts\";\nimport { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport {\n\ttype AuthSelectorProvider,\n\tExtensionSelectorComponent,\n\tOAuthSelectorComponent,\n} from \"./interactive-mode-deps.ts\";\nimport { BEDROCK_PROVIDER_ID } from \"./interactive-mode-helpers.ts\";\nimport { resolveLoginProviderReference } from \"./login-provider-options.ts\";\n\nexport function formatLogoutStatus(\n\tproviderName: string,\n\tauthType: \"oauth\" | \"api_key\",\n\tauthStatus: AuthStatus,\n): string {\n\tconst action = authType === \"oauth\" ? `Logged out of ${providerName}` : `Removed stored API key for ${providerName}`;\n\treturn authStatus.source\n\t\t? `${action}. Authentication remains active through ${authStatus.label ?? authStatus.source}.`\n\t\t: action;\n}\n\nexport function getBuiltinApiKeyLoginOptions(getDisplayName: (providerId: string) => string): AuthSelectorProvider[] {\n\treturn builtinProviders()\n\t\t.filter((provider) => provider.auth.apiKey !== undefined)\n\t\t.map((provider) => ({\n\t\t\tid: provider.id,\n\t\t\tname: getDisplayName(provider.id),\n\t\t\tauthType: \"api_key\" as const,\n\t\t}));\n}\n\nInteractiveModeBase.prototype.getLoginProviderOptions = function (\n\tthis: InteractiveModeBase,\n\tauthType?: \"oauth\" | \"api_key\",\n): AuthSelectorProvider[] {\n\tconst options: AuthSelectorProvider[] = this.session.modelRuntime\n\t\t.getOAuthProviderMetadata()\n\t\t.map((provider) => ({ id: provider.id, name: provider.name, authType: \"oauth\" as const }));\n\tfor (const provider of this.session.modelRuntime.getProviders()) {\n\t\tif (provider.auth.apiKey)\n\t\t\toptions.push({ id: provider.id, name: provider.name ?? provider.id, authType: \"api_key\" });\n\t}\n\treturn (authType ? options.filter((option) => option.authType === authType) : options).sort((a, b) =>\n\t\ta.name.localeCompare(b.name),\n\t);\n};\nInteractiveModeBase.prototype.getLogoutProviderOptions = function (this: InteractiveModeBase): AuthSelectorProvider[] {\n\tconst runtime = this.session.modelRuntime;\n\tconst providers = runtime.getProviders();\n\tconst providerNames = new Map(providers.map((provider) => [provider.id, provider.name ?? provider.id]));\n\tfor (const provider of runtime.getOAuthProviderMetadata()) providerNames.set(provider.id, provider.name);\n\tconst options: AuthSelectorProvider[] = [];\n\tfor (const [providerId, name] of providerNames) {\n\t\tif (runtime.getProviderAuthStatus(providerId).source !== \"stored\") continue;\n\t\tconst authType = runtime.getStoredCredentialType(providerId);\n\t\tif (authType) options.push({ id: providerId, name, authType });\n\t}\n\treturn options.sort((a, b) => a.name.localeCompare(b.name));\n};\n\nInteractiveModeBase.prototype.startProviderLogin = async function (\n\tthis: InteractiveModeBase,\n\tproviderOption: AuthSelectorProvider,\n): Promise<void> {\n\tif (providerOption.authType === \"oauth\") {\n\t\tawait this.showLoginDialog(providerOption.id, providerOption.name);\n\t} else if (providerOption.id === BEDROCK_PROVIDER_ID) {\n\t\tthis.showBedrockSetupDialog(providerOption.id, providerOption.name);\n\t} else {\n\t\tawait this.showApiKeyLoginDialog(providerOption.id, providerOption.name);\n\t}\n};\n\nInteractiveModeBase.prototype.handleLoginCommand = async function (\n\tthis: InteractiveModeBase,\n\tproviderRef?: string,\n): Promise<void> {\n\tif (!providerRef?.trim()) {\n\t\tthis.showLoginAuthTypeSelector();\n\t\treturn;\n\t}\n\tconst resolution = resolveLoginProviderReference(this.getLoginProviderOptions(), providerRef);\n\tif (resolution.kind === \"direct\") {\n\t\tawait this.startProviderLogin(resolution.option);\n\t} else if (resolution.kind === \"choose_method\") {\n\t\tthis.showLoginAuthTypeSelector(resolution.options);\n\t} else {\n\t\tthis.showLoginProviderSelector(undefined, resolution.initialSearch);\n\t}\n};\n\nInteractiveModeBase.prototype.showLoginAuthTypeSelector = function (\n\tthis: InteractiveModeBase,\n\tproviderOptions?: AuthSelectorProvider[],\n): void {\n\tconst subscriptionLabel = \"Use a subscription\";\n\tconst apiKeyLabel = \"Use an API key\";\n\tconst choices = providerOptions\n\t\t? providerOptions.map((provider) => (provider.authType === \"oauth\" ? subscriptionLabel : apiKeyLabel))\n\t\t: [subscriptionLabel, apiKeyLabel];\n\tthis.showSelector((done) => {\n\t\tconst selector = new ExtensionSelectorComponent(\n\t\t\t\"Select authentication method:\",\n\t\t\tchoices,\n\t\t\t(option) => {\n\t\t\t\tdone();\n\t\t\t\tconst authType = option === subscriptionLabel ? \"oauth\" : \"api_key\";\n\t\t\t\tconst directOption = providerOptions?.find((provider) => provider.authType === authType);\n\t\t\t\tif (directOption) void this.startProviderLogin(directOption);\n\t\t\t\telse this.showLoginProviderSelector(authType);\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tdone();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t},\n\t\t);\n\t\treturn { component: selector, focus: selector };\n\t});\n};\n\nInteractiveModeBase.prototype.showLoginProviderSelector = function (\n\tthis: InteractiveModeBase,\n\tauthType?: \"oauth\" | \"api_key\",\n\tinitialSearchInput?: string,\n): void {\n\tconst providerOptions = this.getLoginProviderOptions(authType);\n\tif (providerOptions.length === 0) {\n\t\tconst message =\n\t\t\tauthType === \"oauth\"\n\t\t\t\t? \"No subscription providers available.\"\n\t\t\t\t: authType === \"api_key\"\n\t\t\t\t\t? \"No API key providers available.\"\n\t\t\t\t\t: \"No login providers available.\";\n\t\tthis.showStatus(message);\n\t\treturn;\n\t}\n\n\tthis.showSelector((done) => {\n\t\tconst selector = new OAuthSelectorComponent(\n\t\t\t\"login\",\n\t\t\tthis.session.modelRuntime,\n\t\t\tproviderOptions,\n\t\t\tasync (providerId, selectedAuthType) => {\n\t\t\t\tdone();\n\t\t\t\tconst providerOption = providerOptions.find(\n\t\t\t\t\t(provider) => provider.id === providerId && provider.authType === selectedAuthType,\n\t\t\t\t);\n\t\t\t\tif (providerOption) await this.startProviderLogin(providerOption);\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tdone();\n\t\t\t\tif (authType) this.showLoginAuthTypeSelector();\n\t\t\t\telse this.ui.requestRender();\n\t\t\t},\n\t\t\t(providerId) => this.session.modelRuntime.getProviderAuthStatus(providerId),\n\t\t\tinitialSearchInput,\n\t\t);\n\t\treturn { component: selector, focus: selector };\n\t});\n};\n\nInteractiveModeBase.prototype.showOAuthSelector = async function (\n\tthis: InteractiveModeBase,\n\tmode: \"login\" | \"logout\",\n\tinitialSearchInput?: string,\n): Promise<void> {\n\tif (mode === \"login\") {\n\t\tthis.showLoginAuthTypeSelector();\n\t\treturn;\n\t}\n\tconst providerOptions = this.getLogoutProviderOptions();\n\tif (providerOptions.length === 0) {\n\t\tthis.showStatus(\n\t\t\t\"No stored credentials to remove. /logout only removes credentials saved by /login; environment variables and models.json config are unchanged.\",\n\t\t);\n\t\treturn;\n\t}\n\tthis.showSelector((done) => {\n\t\tconst selector = new OAuthSelectorComponent(\n\t\t\tmode,\n\t\t\tthis.session.modelRuntime,\n\t\t\tproviderOptions,\n\t\t\tasync (providerId, selectedAuthType) => {\n\t\t\t\tdone();\n\t\t\t\tconst providerOption = providerOptions.find(\n\t\t\t\t\t(provider) => provider.id === providerId && provider.authType === selectedAuthType,\n\t\t\t\t);\n\t\t\t\tif (!providerOption) return;\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await this.runtimeHost.logoutProvider(providerOption.id);\n\t\t\t\t\tawait this.updateAvailableProviderCount();\n\t\t\t\t\tthis.setupAutocompleteProvider();\n\t\t\t\t\tthis.showStatus(formatLogoutStatus(providerOption.name, providerOption.authType, result.authStatus));\n\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\t\tthis.showError(\n\t\t\t\t\t\terror instanceof CredentialSynchronizationError\n\t\t\t\t\t\t\t? `Credentials removed for ${providerOption.name}, but local model state could not be synchronized: ${message}`\n\t\t\t\t\t\t\t: `Logout failed: ${message}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tdone();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t},\n\t\t\tundefined,\n\t\t\tinitialSearchInput,\n\t\t);\n\t\treturn { component: selector, focus: selector };\n\t});\n};\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-auth-routing.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive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AAE,KAAK,UAAU,IAAI,QAAQ,CAAC,QAAQ,KAAK,gBAAgB,CAClF,CAAC;YACF,IAAI,CAAC,cAAc;gBAAE,OAAO;YAC5B,IAAI,CAAC;gBACJ,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;gBACxE,MAAM,IAAI,CAAC,4BAA4B,EAAE,CAAC;gBAC1C,IAAI,CAAC,yBAAyB,EAAE,CAAC;gBACjC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;YACtG,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACzB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACvE,IAAI,CAAC,SAAS,CACb,KAAK,YAAY,8BAA8B;oBAC9C,CAAC,CAAC,2BAA2B,cAAc,CAAC,IAAI,sDAAsD,OAAO,EAAE;oBAC/G,CAAC,CAAC,kBAAkB,OAAO,EAAE,CAC9B,CAAC;YACH,CAAC;QACF,CAAC,EACD,GAAG,EAAE;YACJ,IAAI,EAAE,CAAC;YACP,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC;QACzB,CAAC,EACD,SAAS,EACT,kBAAkB,CAClB,CAAC;QACF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IACjD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { builtinProviders } from \"@bastani/pi-ai/providers/all\";\nimport { CredentialSynchronizationError } from \"../../core/model-runtime.js\";\nimport type { AuthStatus } from \"../../core/provider-composer.ts\";\nimport { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport {\n\ttype AuthSelectorProvider,\n\tExtensionSelectorComponent,\n\tOAuthSelectorComponent,\n} from \"./interactive-mode-deps.ts\";\nimport { BEDROCK_PROVIDER_ID } from \"./interactive-mode-helpers.ts\";\nimport { resolveLoginProviderReference } from \"./login-provider-options.ts\";\n\nexport function formatLogoutStatus(\n\tproviderName: string,\n\tauthType: \"oauth\" | \"api_key\",\n\tauthStatus: AuthStatus,\n): string {\n\tconst action = authType === \"oauth\" ? `Logged out of ${providerName}` : `Removed stored API key for ${providerName}`;\n\treturn authStatus.source\n\t\t? `${action}. Authentication remains active through ${authStatus.label ?? authStatus.source}.`\n\t\t: action;\n}\n\nexport function getBuiltinApiKeyLoginOptions(getDisplayName: (providerId: string) => string): AuthSelectorProvider[] {\n\treturn builtinProviders()\n\t\t.filter((provider) => provider.auth.apiKey !== undefined)\n\t\t.map((provider) => ({\n\t\t\tid: provider.id,\n\t\t\tname: getDisplayName(provider.id),\n\t\t\tauthType: \"api_key\" as const,\n\t\t}));\n}\n\nfunction subscriptionFlag(isSubscription: boolean | undefined): { subscription?: boolean } {\n\treturn isSubscription === undefined ? {} : { subscription: isSubscription };\n}\n\nInteractiveModeBase.prototype.getLoginProviderOptions = function (\n\tthis: InteractiveModeBase,\n\tauthType?: \"oauth\" | \"api_key\",\n): AuthSelectorProvider[] {\n\tconst oauthProviders = this.session.modelRuntime.getOAuthProviderMetadata();\n\tconst subscriptions = new Map(oauthProviders.map((provider) => [provider.id, provider.isSubscription]));\n\tconst options: AuthSelectorProvider[] = oauthProviders.map((provider) => ({\n\t\tid: provider.id,\n\t\tname: provider.name,\n\t\tauthType: \"oauth\" as const,\n\t\t...subscriptionFlag(provider.isSubscription),\n\t}));\n\tfor (const provider of this.session.modelRuntime.getProviders()) {\n\t\tif (provider.auth.apiKey)\n\t\t\toptions.push({\n\t\t\t\tid: provider.id,\n\t\t\t\tname: provider.name ?? provider.id,\n\t\t\t\tauthType: \"api_key\",\n\t\t\t\t...subscriptionFlag(subscriptions.get(provider.id)),\n\t\t\t});\n\t}\n\treturn (authType ? options.filter((option) => option.authType === authType) : options).sort((a, b) =>\n\t\ta.name.localeCompare(b.name),\n\t);\n};\nInteractiveModeBase.prototype.getLogoutProviderOptions = function (this: InteractiveModeBase): AuthSelectorProvider[] {\n\tconst runtime = this.session.modelRuntime;\n\tconst providers = runtime.getProviders();\n\tconst providerNames = new Map(providers.map((provider) => [provider.id, provider.name ?? provider.id]));\n\tconst subscriptions = new Map<string, boolean | undefined>();\n\tfor (const provider of runtime.getOAuthProviderMetadata()) {\n\t\tproviderNames.set(provider.id, provider.name);\n\t\tsubscriptions.set(provider.id, provider.isSubscription);\n\t}\n\tconst options: AuthSelectorProvider[] = [];\n\tfor (const [providerId, name] of providerNames) {\n\t\tif (runtime.getProviderAuthStatus(providerId).source !== \"stored\") continue;\n\t\tconst authType = runtime.getStoredCredentialType(providerId);\n\t\tif (authType)\n\t\t\toptions.push({ id: providerId, name, authType, ...subscriptionFlag(subscriptions.get(providerId)) });\n\t}\n\treturn options.sort((a, b) => a.name.localeCompare(b.name));\n};\n\nInteractiveModeBase.prototype.startProviderLogin = async function (\n\tthis: InteractiveModeBase,\n\tproviderOption: AuthSelectorProvider,\n\tonBack?: () => void,\n): Promise<void> {\n\tif (providerOption.authType === \"oauth\") {\n\t\tawait this.showLoginDialog(providerOption.id, providerOption.name, onBack);\n\t} else if (providerOption.id === BEDROCK_PROVIDER_ID) {\n\t\tthis.showBedrockSetupDialog(providerOption.id, providerOption.name, onBack);\n\t} else {\n\t\tawait this.showApiKeyLoginDialog(providerOption.id, providerOption.name, onBack);\n\t}\n};\n\nInteractiveModeBase.prototype.handleLoginCommand = async function (\n\tthis: InteractiveModeBase,\n\tproviderRef?: string,\n): Promise<void> {\n\tif (!providerRef?.trim()) {\n\t\tthis.showLoginAuthTypeSelector();\n\t\treturn;\n\t}\n\tconst resolution = resolveLoginProviderReference(this.getLoginProviderOptions(), providerRef);\n\tif (resolution.kind === \"direct\") {\n\t\tawait this.startProviderLogin(resolution.option);\n\t} else if (resolution.kind === \"choose_method\") {\n\t\tthis.showLoginAuthTypeSelector(resolution.options);\n\t} else {\n\t\tthis.showLoginProviderSelector(undefined, resolution.initialSearch);\n\t}\n};\n\nInteractiveModeBase.prototype.showLoginAuthTypeSelector = function (\n\tthis: InteractiveModeBase,\n\tproviderOptions?: AuthSelectorProvider[],\n): void {\n\tconst subscriptionLabel =\n\t\tproviderOptions?.find((provider) => provider.authType === \"oauth\")?.subscription === false\n\t\t\t? \"Use an account\"\n\t\t\t: \"Use a subscription\";\n\tconst apiKeyLabel = \"Use an API key\";\n\tconst choices = providerOptions\n\t\t? providerOptions.map((provider) => (provider.authType === \"oauth\" ? subscriptionLabel : apiKeyLabel))\n\t\t: [subscriptionLabel, apiKeyLabel];\n\tthis.showSelector((done) => {\n\t\tconst selector = new ExtensionSelectorComponent(\n\t\t\t\"Select authentication method:\",\n\t\t\tchoices,\n\t\t\t(option) => {\n\t\t\t\tdone();\n\t\t\t\tconst authType = option === subscriptionLabel ? \"oauth\" : \"api_key\";\n\t\t\t\tconst directOption = providerOptions?.find((provider) => provider.authType === authType);\n\t\t\t\tif (directOption) {\n\t\t\t\t\tvoid this.startProviderLogin(directOption, () => this.showLoginAuthTypeSelector(providerOptions));\n\t\t\t\t} else {\n\t\t\t\t\tthis.showLoginProviderSelector(authType);\n\t\t\t\t}\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tdone();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t},\n\t\t);\n\t\treturn { component: selector, focus: selector };\n\t});\n};\n\nInteractiveModeBase.prototype.showLoginProviderSelector = function (\n\tthis: InteractiveModeBase,\n\tauthType?: \"oauth\" | \"api_key\",\n\tinitialSearchInput?: string,\n): void {\n\tconst providerOptions = this.getLoginProviderOptions(authType);\n\tif (providerOptions.length === 0) {\n\t\tconst message =\n\t\t\tauthType === \"oauth\"\n\t\t\t\t? \"No account providers available.\"\n\t\t\t\t: authType === \"api_key\"\n\t\t\t\t\t? \"No API key providers available.\"\n\t\t\t\t\t: \"No login providers available.\";\n\t\tthis.showStatus(message);\n\t\treturn;\n\t}\n\n\tthis.showSelector((done) => {\n\t\tconst selector = new OAuthSelectorComponent(\n\t\t\t\"login\",\n\t\t\tthis.session.modelRuntime,\n\t\t\tproviderOptions,\n\t\t\tasync (providerId, selectedAuthType) => {\n\t\t\t\tdone();\n\t\t\t\tconst providerOption = providerOptions.find(\n\t\t\t\t\t(provider) => provider.id === providerId && provider.authType === selectedAuthType,\n\t\t\t\t);\n\t\t\t\tif (providerOption) {\n\t\t\t\t\tawait this.startProviderLogin(providerOption, () =>\n\t\t\t\t\t\tthis.showLoginProviderSelector(authType, initialSearchInput),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tdone();\n\t\t\t\tif (authType) this.showLoginAuthTypeSelector();\n\t\t\t\telse this.ui.requestRender();\n\t\t\t},\n\t\t\t(providerId) => this.session.modelRuntime.getProviderAuthStatus(providerId),\n\t\t\tinitialSearchInput,\n\t\t);\n\t\treturn { component: selector, focus: selector };\n\t});\n};\n\nInteractiveModeBase.prototype.showOAuthSelector = async function (\n\tthis: InteractiveModeBase,\n\tmode: \"login\" | \"logout\",\n\tinitialSearchInput?: string,\n): Promise<void> {\n\tif (mode === \"login\") {\n\t\tthis.showLoginAuthTypeSelector();\n\t\treturn;\n\t}\n\tconst providerOptions = this.getLogoutProviderOptions();\n\tif (providerOptions.length === 0) {\n\t\tthis.showStatus(\n\t\t\t\"No stored credentials to remove. /logout only removes credentials saved by /login; environment variables and models.json config are unchanged.\",\n\t\t);\n\t\treturn;\n\t}\n\tthis.showSelector((done) => {\n\t\tconst selector = new OAuthSelectorComponent(\n\t\t\tmode,\n\t\t\tthis.session.modelRuntime,\n\t\t\tproviderOptions,\n\t\t\tasync (providerId, selectedAuthType) => {\n\t\t\t\tdone();\n\t\t\t\tconst providerOption = providerOptions.find(\n\t\t\t\t\t(provider) => provider.id === providerId && provider.authType === selectedAuthType,\n\t\t\t\t);\n\t\t\t\tif (!providerOption) return;\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await this.runtimeHost.logoutProvider(providerOption.id);\n\t\t\t\t\tawait this.updateAvailableProviderCount();\n\t\t\t\t\tthis.setupAutocompleteProvider();\n\t\t\t\t\tthis.showStatus(formatLogoutStatus(providerOption.name, providerOption.authType, result.authStatus));\n\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\t\tthis.showError(\n\t\t\t\t\t\terror instanceof CredentialSynchronizationError\n\t\t\t\t\t\t\t? `Credentials removed for ${providerOption.name}, but local model state could not be synchronized: ${message}`\n\t\t\t\t\t\t\t: `Logout failed: ${message}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tdone();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t},\n\t\t\tundefined,\n\t\t\tinitialSearchInput,\n\t\t);\n\t\treturn { component: selector, focus: selector };\n\t});\n};\n"]}
|
|
@@ -44,6 +44,8 @@ declare module "./interactive-mode-base.ts" {
|
|
|
44
44
|
getStartupIdentityText(maxWidth?: number, gap?: number, manifestoPhase?: number): string;
|
|
45
45
|
getAtomicAnsiMarkLines(gap?: number): string[];
|
|
46
46
|
getStartupExpansionState(): boolean;
|
|
47
|
+
shouldShowStartupHeader(): boolean;
|
|
48
|
+
shouldShowStartupDetails(): boolean;
|
|
47
49
|
getShortPath(fullPath: string, sourceInfo?: SourceInfo): string;
|
|
48
50
|
getCompactPathLabel(resourcePath: string, sourceInfo?: SourceInfo): string;
|
|
49
51
|
getCompactPackageSourceLabel(sourceInfo?: SourceInfo): string;
|
|
@@ -333,17 +335,17 @@ declare module "./interactive-mode-base.ts" {
|
|
|
333
335
|
getLoginProviderOptions(authType?: "oauth" | "api_key"): AuthSelectorProvider[];
|
|
334
336
|
getLogoutProviderOptions(): AuthSelectorProvider[];
|
|
335
337
|
handleLoginCommand(providerRef?: string): Promise<void>;
|
|
336
|
-
startProviderLogin(providerOption: AuthSelectorProvider): Promise<void>;
|
|
338
|
+
startProviderLogin(providerOption: AuthSelectorProvider, onBack?: () => void): Promise<void>;
|
|
337
339
|
showLoginAuthTypeSelector(providerOptions?: AuthSelectorProvider[]): void;
|
|
338
340
|
showLoginProviderSelector(authType?: "oauth" | "api_key", initialSearchInput?: string): void;
|
|
339
341
|
showOAuthSelector(mode: "login" | "logout", initialSearchInput?: string): Promise<void>;
|
|
340
342
|
completeProviderAuthentication(providerId: string, providerName: string, authType: "oauth" | "api_key", previousModel: Model<Api> | undefined, options?: {
|
|
341
343
|
modelsRefreshed?: boolean;
|
|
342
344
|
}): Promise<void>;
|
|
343
|
-
showBedrockSetupDialog(providerId: string, providerName: string): void;
|
|
344
|
-
showApiKeyLoginDialog(providerId: string, providerName: string): Promise<void>;
|
|
345
|
+
showBedrockSetupDialog(providerId: string, providerName: string, onBack?: () => void): void;
|
|
346
|
+
showApiKeyLoginDialog(providerId: string, providerName: string, onBack?: () => void): Promise<void>;
|
|
345
347
|
showOAuthLoginSelect(dialog: LoginDialogComponent, prompt: OAuthSelectPrompt): Promise<string | undefined>;
|
|
346
|
-
showLoginDialog(providerId: string, providerName: string): Promise<void>;
|
|
348
|
+
showLoginDialog(providerId: string, providerName: string, onBack?: () => void): Promise<void>;
|
|
347
349
|
handleReloadCommand(): Promise<void>;
|
|
348
350
|
handleExportCommand(text: string): Promise<void>;
|
|
349
351
|
getPathCommandArgument(text: string, command: "/export" | "/import"): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-mode-surface.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode-surface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,4EAA4E;AAE5E,OAAO,KAAK,EAAE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OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;QAClD,oBAAoB,IAAI,IAAI,CAAC;QAC7B,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;QACpC,kBAAkB,IAAI,IAAI,CAAC;QAC3B,iBAAiB,IAAI,IAAI,CAAC;QAC1B,oBAAoB,IAAI,IAAI,CAAC;QAC7B,aAAa,IAAI,IAAI,CAAC;QACtB,qBAAqB,CAAC,KAAK,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAC;QACrE,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAChF,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;KACxD;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-mode-surface.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode-surface.ts"],"names":[],"mappings":"","sourcesContent":["import type { AssistantMessage, Usage } from \"@bastani/pi-ai/compat\";\nimport type { ThinkingLevel } from \"@earendil-works/pi-agent-core\";\n/** Method surface installed onto InteractiveModeBase by sibling modules. */\n\nimport type { MarkdownTransformer } from \"../../core/extensions/types.ts\";\nimport type { CustomEntry, SessionEntry } from \"../../core/session-manager.ts\";\nimport type { FullscreenExitOutput } from \"../../core/settings-manager.ts\";\nimport type { ToolStatus } from \"../../utils/tools-manager.ts\";\nimport type { JsonAgentSessionEvent } from \"../json-event.ts\";\nimport type { AtomicWorkingLoader } from \"./components/atomic-working-status.ts\";\nimport type {\n\tAgentMessage,\n\tAgentSession,\n\tAgentSessionEvent,\n\tApi,\n\tAppKeybinding,\n\tAuthSelectorProvider,\n\tAutocompleteProvider,\n\tChatMessageEntry,\n\tChatMessageRenderOptions,\n\tComponent,\n\tContainer,\n\tEditorFactory,\n\tExtensionCommandContext,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionRunner,\n\tExtensionSelectorComponent,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tHostCustomUiState,\n\tHostCustomUiStateListener,\n\tKeybinding,\n\tKeybindingsManager,\n\tLoaderIndicatorOptions,\n\tLoginDialogComponent,\n\tMarkdownTheme,\n\tMessage,\n\tMissingSessionCwdError,\n\tModel,\n\tOAuthSelectPrompt,\n\tOverlayHandle,\n\tOverlayOptions,\n\tProjectTrustContext,\n\tReadonlyFooterDataProvider,\n\tResourceDiagnostic,\n\tSessionContext,\n\tSlashCommand,\n\tSourceInfo,\n\tTheme,\n\tTUI,\n\tVerbatimCompactionResult,\n} from \"./interactive-mode-deps.ts\";\nimport type { InteractiveSubmission } from \"./interactive-submission.ts\";\n\ndeclare module \"./interactive-mode-base.ts\" {\n\tinterface InteractiveModeBase {\n\t\tgetAutocompleteSourceTag(sourceInfo?: SourceInfo): string | undefined;\n\t\tprefixAutocompleteDescription(description: string | undefined, sourceInfo?: SourceInfo): string | undefined;\n\t\tgetBuiltInCommandConflictDiagnostics(extensionRunner: ExtensionRunner): ResourceDiagnostic[];\n\t\tcreateBaseAutocompleteProvider(): AutocompleteProvider;\n\t\tbuildRemoteSlashCommands(localCommands: SlashCommand[]): SlashCommand[];\n\t\tsetupAutocompleteProvider(): void;\n\t\tshowStartupNoticesIfNeeded(targetContainer?: Container): void;\n\t\treportModelCatalogWarning(targetContainer?: Container): void;\n\t\treportedModelCatalogWarning: string | undefined;\n\t\thadLastChangelogVersionAtStartup: boolean;\n\t\tfirstRunNoticeVisible: boolean;\n\t\tfirstRunOnboardingNoticeComponents: Component[];\n\t\tinitializeFirstRunOnboardingMarkers(): void;\n\t\tisFirstRunOnboardingEligible(): boolean;\n\t\tclearFirstRunOnboardingUi(): void;\n\t\tinit(): Promise<void>;\n\t\tcompleteDeferredStartup(): Promise<void>;\n\t\tretryDeferredModelRestore(targetContainer?: Container): Promise<void>;\n\t\tupdateTerminalTitle(): void;\n\t\trun(): Promise<void>;\n\t\tcheckForPackageUpdates(): Promise<string[]>;\n\t\tcheckTmuxKeyboardSetup(): Promise<string | undefined>;\n\t\tgetChangelogForDisplay(): string | undefined;\n\t\treportInstallTelemetry(version: string): void;\n\t\tgetMarkdownThemeWithSettings(): MarkdownTheme;\n\t\tgetMarkdownTransformers(): MarkdownTransformer[];\n\t\tformatDisplayPath(p: string): string;\n\t\tformatExtensionDisplayPath(path: string): string;\n\t\tformatContextPath(p: string): string;\n\t\tgetStartupModelLabel(): string;\n\t\tgetStartupIdentityText(maxWidth?: number, gap?: number, manifestoPhase?: number): string;\n\t\tgetAtomicAnsiMarkLines(gap?: number): string[];\n\t\tgetStartupExpansionState(): boolean;\n\t\tgetShortPath(fullPath: string, sourceInfo?: SourceInfo): string;\n\t\tgetCompactPathLabel(resourcePath: string, sourceInfo?: SourceInfo): string;\n\t\tgetCompactPackageSourceLabel(sourceInfo?: SourceInfo): string;\n\t\tgetCompactExtensionLabel(resourcePath: string, sourceInfo?: SourceInfo): string;\n\t\tgetCompactDisplayPathSegments(resourcePath: string): string[];\n\t\tgetCompactNonPackageExtensionLabel(\n\t\t\tresourcePath: string,\n\t\t\tindex: number,\n\t\t\tallPaths: Array<{ path: string; segments: string[] }>,\n\t\t): string;\n\t\tgetCompactExtensionLabels(extensions: Array<{ path: string; sourceInfo?: SourceInfo }>): string[];\n\t\tgetDisplaySourceInfo(sourceInfo?: SourceInfo): {\n\t\t\tlabel: string;\n\t\t\tscopeLabel?: string;\n\t\t\tcolor: \"accent\" | \"muted\";\n\t\t};\n\t\tgetScopeGroup(sourceInfo?: SourceInfo): \"user\" | \"project\" | \"path\";\n\t\tisPackageSource(sourceInfo?: SourceInfo): boolean;\n\t\tbuildScopeGroups(items: Array<{ path: string; sourceInfo?: SourceInfo }>): Array<{\n\t\t\tscope: \"user\" | \"project\" | \"path\";\n\t\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t\t}>;\n\t\tformatScopeGroups(\n\t\t\tgroups: Array<{\n\t\t\t\tscope: \"user\" | \"project\" | \"path\";\n\t\t\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t\t\t}>,\n\t\t\toptions: {\n\t\t\t\tformatPath: (item: { path: string; sourceInfo?: SourceInfo }) => string;\n\t\t\t\tformatPackagePath: (item: { path: string; sourceInfo?: SourceInfo }, source: string) => string;\n\t\t\t},\n\t\t): string;\n\t\tfindSourceInfoForPath(p: string, sourceInfos: Map<string, SourceInfo>): SourceInfo | undefined;\n\t\tformatPathWithSource(p: string, sourceInfo?: SourceInfo): string;\n\t\tformatDiagnostics(diagnostics: readonly ResourceDiagnostic[], sourceInfos: Map<string, SourceInfo>): string;\n\t\taddResourceDisclosure(options: {\n\t\t\tcontextFiles: ReadonlyArray<{ path: string }>;\n\t\t\tskills: ReadonlyArray<{ filePath: string; name: string }>;\n\t\t\tprompts: ReadonlyArray<{ filePath: string; name: string }>;\n\t\t\textensions: ReadonlyArray<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\texpandedSections: {\n\t\t\t\tcontext?: string;\n\t\t\t\tskills?: string;\n\t\t\t\tprompts?: string;\n\t\t\t\textensions?: string;\n\t\t\t};\n\t\t\ttargetContainer?: Container;\n\t\t}): void;\n\t\tshowLoadedResources(options?: {\n\t\t\textensions?: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\tforce?: boolean;\n\t\t\tshowDiagnosticsWhenQuiet?: boolean;\n\t\t\ttargetContainer?: Container;\n\t\t}): void;\n\t\tbindCurrentSessionExtensions(): Promise<void>;\n\t\tapplyRuntimeSettings(): void;\n\t\trebindCurrentSession(): Promise<void>;\n\t\thandleFatalRuntimeError(prefix: string, error: unknown): Promise<never>;\n\t\trenderCurrentSessionState(): void;\n\t\tgetRegisteredToolDefinition(toolName: string): ReturnType<AgentSession[\"getToolDefinition\"]>;\n\t\tsetupExtensionShortcuts(extensionRunner: ExtensionRunner): void;\n\t\tsetExtensionStatus(key: string, text: string | undefined): void;\n\t\tgetWorkingLoaderMessage(): string;\n\t\tcreateWorkingLoader(): AtomicWorkingLoader;\n\t\tclearWorkingLoader(): void;\n\t\tstopWorkingLoader(): void;\n\t\tshowWorkingLoaderNow(): void;\n\t\tsetWorkingVisible(visible: boolean): void;\n\t\tsetWorkingIndicator(options?: LoaderIndicatorOptions): void;\n\t\tsetHiddenThinkingLabel(label?: string): void;\n\t\tsetExtensionWidget(\n\t\t\tkey: string,\n\t\t\tcontent: string[] | ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined,\n\t\t\toptions?: ExtensionWidgetOptions,\n\t\t): void;\n\t\tclearExtensionWidgets(): void;\n\t\tresetExtensionUI(): void;\n\t\trenderWidgets(): void;\n\t\trenderWidgetContainer(\n\t\t\tcontainer: Container,\n\t\t\twidgets: Map<string, Component & { dispose?(): void }>,\n\t\t\tspacerWhenEmpty: boolean,\n\t\t\tleadingSpacer: boolean,\n\t\t): void;\n\t\tsetExtensionFooter(\n\t\t\tfactory:\n\t\t\t\t| ((tui: TUI, thm: Theme, footerData: ReadonlyFooterDataProvider) => Component & { dispose?(): void })\n\t\t\t\t| undefined,\n\t\t): void;\n\t\tsetExtensionHeader(factory: ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined): void;\n\t\taddExtensionTerminalInputListener(\n\t\t\thandler: (data: string) => { consume?: boolean; data?: string } | undefined,\n\t\t): () => void;\n\t\tclearExtensionTerminalInputListeners(): void;\n\t\tgetHostCustomUiState(): HostCustomUiState;\n\t\tnotifyHostCustomUiStateListeners(): void;\n\t\tbeginHostInlineCustomUi(purpose?: \"prompt\" | \"navigation\"): () => void;\n\t\tbeginInlineCustomUiFocusDeferral(): () => void;\n\t\tshouldDeferInlineCustomUiFocus(): boolean;\n\t\tfocusHostInlineCustomUi(): boolean;\n\t\tonHostCustomUiStateChange(listener: HostCustomUiStateListener): () => void;\n\t\tonExtensionWidgetRelease(key: string, listener: () => void): () => void;\n\t\tnotifyExtensionWidgetRelease(key: string): void;\n\t\tcreateProjectTrustContext(cwd: string): ProjectTrustContext;\n\t\tcreateExtensionUIContext(): ExtensionUIContext;\n\t\tshowExtensionSelector(\n\t\t\ttitle: string,\n\t\t\toptions: string[],\n\t\t\topts?: ExtensionUIDialogOptions,\n\t\t): Promise<string | undefined>;\n\t\thideExtensionSelector(instance?: ExtensionSelectorComponent): void;\n\t\tshowExtensionConfirm(title: string, message: string, opts?: ExtensionUIDialogOptions): Promise<boolean>;\n\t\tpromptForMissingSessionCwd(error: MissingSessionCwdError): Promise<string | undefined>;\n\t\tshowExtensionInput(\n\t\t\ttitle: string,\n\t\t\tplaceholder?: string,\n\t\t\topts?: ExtensionUIDialogOptions,\n\t\t): Promise<string | undefined>;\n\t\thideExtensionInput(instance?: ExtensionInputComponent): void;\n\t\tshowExtensionEditor(\n\t\t\ttitle: string,\n\t\t\tprefill?: string,\n\t\t\topts?: ExtensionUIDialogOptions,\n\t\t): Promise<string | undefined>;\n\t\thideExtensionEditor(instance?: ExtensionEditorComponent): void;\n\t\tsetCustomEditorComponent(factory: EditorFactory | undefined): void;\n\t\tshowExtensionNotify(message: string, type?: \"info\" | \"warning\" | \"error\"): void;\n\t\tshowExtensionCustom<T>(\n\t\t\tfactory: (\n\t\t\t\ttui: TUI,\n\t\t\t\ttheme: Theme,\n\t\t\t\tkeybindings: KeybindingsManager,\n\t\t\t\tdone: (result: T) => void,\n\t\t\t) => (Component & { dispose?(): void }) | Promise<Component & { dispose?(): void }>,\n\t\t\toptions?: {\n\t\t\t\tpurpose?: \"prompt\" | \"navigation\";\n\t\t\t\toverlay?: boolean;\n\t\t\t\tdeferInlineCustomUiFocus?: boolean;\n\t\t\t\thandlesInternalUiAction?: boolean;\n\t\t\t\t/** Overlay-only: bound the overlay and reserve transcript scroll extent. */\n\t\t\t\treserveTranscriptRows?: boolean;\n\t\t\t\tsignal?: AbortSignal;\n\t\t\t\toverlayOptions?: OverlayOptions | (() => OverlayOptions);\n\t\t\t\tonHandle?: (handle: OverlayHandle) => void;\n\t\t\t},\n\t\t): Promise<T>;\n\t\tshowExtensionError(extensionPath: string, error: string, stack?: string): void;\n\t\tsetupKeyHandlers(): void;\n\t\thandleClipboardImagePaste(): Promise<void>;\n\t\tsetupEditorSubmitHandler(): void;\n\t\tdeliverStartupReplayPrompt(text: string): void;\n\t\trecoverCookedStartupInput(): boolean;\n\t\tdrainStartupReplayCommands(): Promise<void>;\n\t\tadvanceStartupInputReplay(submittedText: string): void;\n\t\tsubscribeToAgent(): void;\n\t\thandleEvent(event: AgentSessionEvent | JsonAgentSessionEvent): Promise<void>;\n\t\tgetUserMessageText(message: Message): string;\n\t\tshowStatus(message: string, persist?: boolean): void;\n\t\t/** Report a managed-tool (fd/rg) readiness update inside the transcript. */\n\t\tshowManagedToolStatus(status: ToolStatus): void;\n\t\t/** Bring fd/rg to readiness after first paint; progress lands in the transcript. */\n\t\tensureManagedToolsReady(): Promise<void>;\n\t\tchatMessageRenderOptions(): ChatMessageRenderOptions;\n\t\taddRenderedChatEntry(entry: ChatMessageEntry): Component;\n\t\taddCompactionBoundaryToChat(result: VerbatimCompactionResult): void;\n\t\taddCompactionCostNotice(kind: \"compaction\" | \"branch_summary\", usage: Usage): void;\n\t\tmaybeShowAssistantDiagnostics(message: AssistantMessage): void;\n\t\taddMessageToChat(message: AgentMessage, options?: { populateHistory?: boolean }): void;\n\t\taddCustomEntryToChat(entry: CustomEntry): void;\n\t\trenderSessionContext(\n\t\t\tsessionContext: SessionContext,\n\t\t\toptions?: { updateFooter?: boolean; populateHistory?: boolean },\n\t\t): void;\n\t\trenderSessionEntries(\n\t\t\tentries: SessionEntry[],\n\t\t\toptions?: {\n\t\t\t\tupdateFooter?: boolean;\n\t\t\t\tpopulateHistory?: boolean;\n\t\t\t\tsuppressCompactionBoundary?: VerbatimCompactionResult;\n\t\t\t},\n\t\t): void;\n\t\trenderInitialMessages(): void;\n\t\tattachStartupNoticesContainer(options?: { resetDetached?: boolean }): void;\n\t\tgetUserInput(): Promise<InteractiveSubmission>;\n\t\trunUserPromptTurn(submission: InteractiveSubmission | string): Promise<void>;\n\t\trenderDeferredUserInput(text: string): void;\n\t\tconsumeDeferredRenderedUserInput(text: string): boolean;\n\t\tdiscardDeferredRenderedUserInput(text: string): void;\n\t\tensureDeferredStartupComplete(): Promise<void>;\n\t\trebuildChatFromMessages(options?: {\n\t\t\tsuppressCompactionBoundary?: VerbatimCompactionResult;\n\t\t\tresetStartupDisclosure?: boolean;\n\t\t}): void;\n\t\thandleCtrlC(): void;\n\t\tinterruptActiveOperation(): boolean;\n\t\thandleCtrlD(): void;\n\t\tshutdown(options?: { fromSignal?: boolean }): Promise<void>;\n\t\temergencyTerminalExit(): never;\n\t\tuncaughtCrash(error: Error): never;\n\t\tgetCrashExtensionHint(error: unknown): string | undefined;\n\t\tcheckShutdownRequested(): Promise<void>;\n\t\tregisterSignalHandlers(): void;\n\t\tunregisterSignalHandlers(): void;\n\t\thandleCtrlZ(): void;\n\t\thandleFollowUp(): Promise<void>;\n\t\thandleDequeue(): void;\n\t\trefreshBuiltInHeader(): void;\n\t\tupdateEditorBorderColor(): void;\n\t\tcycleThinkingLevel(): void;\n\t\tcycleModel(direction: \"forward\" | \"backward\"): Promise<void>;\n\t\ttoggleToolOutputExpansion(): void;\n\t\tsetToolsExpanded(expanded: boolean): void;\n\t\ttoggleThinkingBlockVisibility(): void;\n\t\tupdateThinkingBlockVisibility(): void;\n\t\topenExternalEditor(): Promise<void>;\n\t\tclearEditor(): void;\n\t\tshowError(errorMessage: string): void;\n\t\tshowWarning(warningMessage: string, targetContainer?: Container): void;\n\t\tshowNewVersionNotification(newVersion: string, targetContainer?: Container): void;\n\t\tshowPackageUpdateNotification(packages: string[], targetContainer?: Container): void;\n\t\tgetAllQueuedMessages(): { steering: string[]; followUp: string[] };\n\t\tclearAllQueues(options?: { preserveUnprotectedCustomMessages?: boolean }): {\n\t\t\tsteering: string[];\n\t\t\tfollowUp: string[];\n\t\t};\n\t\tupdatePendingMessagesDisplay(): void;\n\t\trestoreQueuedMessagesToEditor(options?: {\n\t\t\tabort?: boolean;\n\t\t\tcurrentText?: string;\n\t\t\tpreserveUnprotectedCustomMessages?: boolean;\n\t\t}): number;\n\t\tqueueCompactionMessage(text: string, mode: \"steer\" | \"followUp\"): void;\n\t\tisExtensionCommand(text: string): boolean;\n\t\tflushCompactionQueue(options?: { willRetry?: boolean }): Promise<void>;\n\t\tflushPendingBashComponents(): void;\n\t\tshowSelector(\n\t\t\tcreate: (done: () => void) => { component: Component; focus: Component; dispose?: () => void },\n\t\t): void;\n\t\tshowSettingsSelector(): void;\n\t\thandleModelCommand(searchTerm?: string): Promise<void>;\n\t\thandleThinkingCommand(searchTerm?: string): void;\n\t\tselectThinkingLevel(level: ThinkingLevel): void;\n\t\tshowThinkingSelector(): void;\n\t\tfindExactModelMatch(searchTerm: string): Promise<Model<Api> | undefined>;\n\t\tgetModelCandidates(): Promise<Model<Api>[]>;\n\t\tupdateAvailableProviderCount(): Promise<void>;\n\t\tmaybeWarnAboutAnthropicSubscriptionAuth(\n\t\t\tmodel?: Model<Api> | undefined,\n\t\t\ttargetContainer?: Container,\n\t\t): Promise<void>;\n\t\tshowModelSelector(initialSearchInput?: string): void;\n\t\tshowModelsSelector(): void;\n\t\tshowUserMessageSelector(): Promise<void>;\n\t\thandleCloneCommand(): Promise<void>;\n\t\tmaybeSaveImplicitProjectTrustAfterReload(): boolean;\n\t\tshowTrustSelector(): void;\n\t\tshowTreeSelector(initialSelectedId?: string): Promise<void>;\n\t\tshowSessionSelector(): void;\n\t\thandleResumeSession(\n\t\t\tsessionPath: string,\n\t\t\toptions?: Parameters<ExtensionCommandContext[\"switchSession\"]>[1],\n\t\t): Promise<{ cancelled: boolean }>;\n\t\tgetLoginProviderOptions(authType?: \"oauth\" | \"api_key\"): AuthSelectorProvider[];\n\t\tgetLogoutProviderOptions(): AuthSelectorProvider[];\n\t\thandleLoginCommand(providerRef?: string): Promise<void>;\n\t\tstartProviderLogin(providerOption: AuthSelectorProvider): Promise<void>;\n\t\tshowLoginAuthTypeSelector(providerOptions?: AuthSelectorProvider[]): void;\n\t\tshowLoginProviderSelector(authType?: \"oauth\" | \"api_key\", initialSearchInput?: string): void;\n\t\tshowOAuthSelector(mode: \"login\" | \"logout\", initialSearchInput?: string): Promise<void>;\n\t\tcompleteProviderAuthentication(\n\t\t\tproviderId: string,\n\t\t\tproviderName: string,\n\t\t\tauthType: \"oauth\" | \"api_key\",\n\t\t\tpreviousModel: Model<Api> | undefined,\n\t\t\toptions?: { modelsRefreshed?: boolean },\n\t\t): Promise<void>;\n\t\tshowBedrockSetupDialog(providerId: string, providerName: string): void;\n\t\tshowApiKeyLoginDialog(providerId: string, providerName: string): Promise<void>;\n\t\tshowOAuthLoginSelect(dialog: LoginDialogComponent, prompt: OAuthSelectPrompt): Promise<string | undefined>;\n\t\tshowLoginDialog(providerId: string, providerName: string): Promise<void>;\n\t\thandleReloadCommand(): Promise<void>;\n\t\thandleExportCommand(text: string): Promise<void>;\n\t\tgetPathCommandArgument(text: string, command: \"/export\" | \"/import\"): string | undefined;\n\t\thandleImportCommand(text: string): Promise<void>;\n\t\thandleShareCommand(): Promise<void>;\n\t\thandleCopyCommand(): Promise<void>;\n\t\thandleNameCommand(text: string): void;\n\t\thandleSessionCommand(): void;\n\t\thandleChangelogCommand(): void;\n\t\tgetAppKeyDisplay(action: AppKeybinding): string;\n\t\tgetEditorKeyDisplay(action: Keybinding): string;\n\t\tjumpToTranscriptEnd(): void;\n\t\tsetFullscreenCopyOnSelect(enabled: boolean): void;\n\t\thandleHotkeysCommand(): void;\n\t\thandleClearCommand(): Promise<void>;\n\t\thandleDebugCommand(): void;\n\t\thandleArminSaysHi(): void;\n\t\thandleDementedDelves(): void;\n\t\thandleDaxnuts(): void;\n\t\tcheckDaxnutsEasterEgg(model: { provider: string; id: string }): void;\n\t\thandleBashCommand(command: string, excludeFromContext?: boolean): Promise<void>;\n\t\thandleCompactCommand(): Promise<void>;\n\t\tstop(fullscreenExitOutput?: FullscreenExitOutput): void;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-mode-surface.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode-surface.ts"],"names":[],"mappings":"","sourcesContent":["import type { AssistantMessage, Usage } from \"@bastani/pi-ai/compat\";\nimport type { ThinkingLevel } from \"@earendil-works/pi-agent-core\";\n/** Method surface installed onto InteractiveModeBase by sibling modules. */\n\nimport type { MarkdownTransformer } from \"../../core/extensions/types.ts\";\nimport type { CustomEntry, SessionEntry } from \"../../core/session-manager.ts\";\nimport type { FullscreenExitOutput } from \"../../core/settings-manager.ts\";\nimport type { ToolStatus } from \"../../utils/tools-manager.ts\";\nimport type { JsonAgentSessionEvent } from \"../json-event.ts\";\nimport type { AtomicWorkingLoader } from \"./components/atomic-working-status.ts\";\nimport type {\n\tAgentMessage,\n\tAgentSession,\n\tAgentSessionEvent,\n\tApi,\n\tAppKeybinding,\n\tAuthSelectorProvider,\n\tAutocompleteProvider,\n\tChatMessageEntry,\n\tChatMessageRenderOptions,\n\tComponent,\n\tContainer,\n\tEditorFactory,\n\tExtensionCommandContext,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionRunner,\n\tExtensionSelectorComponent,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tHostCustomUiState,\n\tHostCustomUiStateListener,\n\tKeybinding,\n\tKeybindingsManager,\n\tLoaderIndicatorOptions,\n\tLoginDialogComponent,\n\tMarkdownTheme,\n\tMessage,\n\tMissingSessionCwdError,\n\tModel,\n\tOAuthSelectPrompt,\n\tOverlayHandle,\n\tOverlayOptions,\n\tProjectTrustContext,\n\tReadonlyFooterDataProvider,\n\tResourceDiagnostic,\n\tSessionContext,\n\tSlashCommand,\n\tSourceInfo,\n\tTheme,\n\tTUI,\n\tVerbatimCompactionResult,\n} from \"./interactive-mode-deps.ts\";\nimport type { InteractiveSubmission } from \"./interactive-submission.ts\";\n\ndeclare module \"./interactive-mode-base.ts\" {\n\tinterface InteractiveModeBase {\n\t\tgetAutocompleteSourceTag(sourceInfo?: SourceInfo): string | undefined;\n\t\tprefixAutocompleteDescription(description: string | undefined, sourceInfo?: SourceInfo): string | undefined;\n\t\tgetBuiltInCommandConflictDiagnostics(extensionRunner: ExtensionRunner): ResourceDiagnostic[];\n\t\tcreateBaseAutocompleteProvider(): AutocompleteProvider;\n\t\tbuildRemoteSlashCommands(localCommands: SlashCommand[]): SlashCommand[];\n\t\tsetupAutocompleteProvider(): void;\n\t\tshowStartupNoticesIfNeeded(targetContainer?: Container): void;\n\t\treportModelCatalogWarning(targetContainer?: Container): void;\n\t\treportedModelCatalogWarning: string | undefined;\n\t\thadLastChangelogVersionAtStartup: boolean;\n\t\tfirstRunNoticeVisible: boolean;\n\t\tfirstRunOnboardingNoticeComponents: Component[];\n\t\tinitializeFirstRunOnboardingMarkers(): void;\n\t\tisFirstRunOnboardingEligible(): boolean;\n\t\tclearFirstRunOnboardingUi(): void;\n\t\tinit(): Promise<void>;\n\t\tcompleteDeferredStartup(): Promise<void>;\n\t\tretryDeferredModelRestore(targetContainer?: Container): Promise<void>;\n\t\tupdateTerminalTitle(): void;\n\t\trun(): Promise<void>;\n\t\tcheckForPackageUpdates(): Promise<string[]>;\n\t\tcheckTmuxKeyboardSetup(): Promise<string | undefined>;\n\t\tgetChangelogForDisplay(): string | undefined;\n\t\treportInstallTelemetry(version: string): void;\n\t\tgetMarkdownThemeWithSettings(): MarkdownTheme;\n\t\tgetMarkdownTransformers(): MarkdownTransformer[];\n\t\tformatDisplayPath(p: string): string;\n\t\tformatExtensionDisplayPath(path: string): string;\n\t\tformatContextPath(p: string): string;\n\t\tgetStartupModelLabel(): string;\n\t\tgetStartupIdentityText(maxWidth?: number, gap?: number, manifestoPhase?: number): string;\n\t\tgetAtomicAnsiMarkLines(gap?: number): string[];\n\t\tgetStartupExpansionState(): boolean;\n\t\tshouldShowStartupHeader(): boolean;\n\t\tshouldShowStartupDetails(): boolean;\n\t\tgetShortPath(fullPath: string, sourceInfo?: SourceInfo): string;\n\t\tgetCompactPathLabel(resourcePath: string, sourceInfo?: SourceInfo): string;\n\t\tgetCompactPackageSourceLabel(sourceInfo?: SourceInfo): string;\n\t\tgetCompactExtensionLabel(resourcePath: string, sourceInfo?: SourceInfo): string;\n\t\tgetCompactDisplayPathSegments(resourcePath: string): string[];\n\t\tgetCompactNonPackageExtensionLabel(\n\t\t\tresourcePath: string,\n\t\t\tindex: number,\n\t\t\tallPaths: Array<{ path: string; segments: string[] }>,\n\t\t): string;\n\t\tgetCompactExtensionLabels(extensions: Array<{ path: string; sourceInfo?: SourceInfo }>): string[];\n\t\tgetDisplaySourceInfo(sourceInfo?: SourceInfo): {\n\t\t\tlabel: string;\n\t\t\tscopeLabel?: string;\n\t\t\tcolor: \"accent\" | \"muted\";\n\t\t};\n\t\tgetScopeGroup(sourceInfo?: SourceInfo): \"user\" | \"project\" | \"path\";\n\t\tisPackageSource(sourceInfo?: SourceInfo): boolean;\n\t\tbuildScopeGroups(items: Array<{ path: string; sourceInfo?: SourceInfo }>): Array<{\n\t\t\tscope: \"user\" | \"project\" | \"path\";\n\t\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t\t}>;\n\t\tformatScopeGroups(\n\t\t\tgroups: Array<{\n\t\t\t\tscope: \"user\" | \"project\" | \"path\";\n\t\t\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t\t\t}>,\n\t\t\toptions: {\n\t\t\t\tformatPath: (item: { path: string; sourceInfo?: SourceInfo }) => string;\n\t\t\t\tformatPackagePath: (item: { path: string; sourceInfo?: SourceInfo }, source: string) => string;\n\t\t\t},\n\t\t): string;\n\t\tfindSourceInfoForPath(p: string, sourceInfos: Map<string, SourceInfo>): SourceInfo | undefined;\n\t\tformatPathWithSource(p: string, sourceInfo?: SourceInfo): string;\n\t\tformatDiagnostics(diagnostics: readonly ResourceDiagnostic[], sourceInfos: Map<string, SourceInfo>): string;\n\t\taddResourceDisclosure(options: {\n\t\t\tcontextFiles: ReadonlyArray<{ path: string }>;\n\t\t\tskills: ReadonlyArray<{ filePath: string; name: string }>;\n\t\t\tprompts: ReadonlyArray<{ filePath: string; name: string }>;\n\t\t\textensions: ReadonlyArray<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\texpandedSections: {\n\t\t\t\tcontext?: string;\n\t\t\t\tskills?: string;\n\t\t\t\tprompts?: string;\n\t\t\t\textensions?: string;\n\t\t\t};\n\t\t\ttargetContainer?: Container;\n\t\t}): void;\n\t\tshowLoadedResources(options?: {\n\t\t\textensions?: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\tforce?: boolean;\n\t\t\tshowDiagnosticsWhenQuiet?: boolean;\n\t\t\ttargetContainer?: Container;\n\t\t}): void;\n\t\tbindCurrentSessionExtensions(): Promise<void>;\n\t\tapplyRuntimeSettings(): void;\n\t\trebindCurrentSession(): Promise<void>;\n\t\thandleFatalRuntimeError(prefix: string, error: unknown): Promise<never>;\n\t\trenderCurrentSessionState(): void;\n\t\tgetRegisteredToolDefinition(toolName: string): ReturnType<AgentSession[\"getToolDefinition\"]>;\n\t\tsetupExtensionShortcuts(extensionRunner: ExtensionRunner): void;\n\t\tsetExtensionStatus(key: string, text: string | undefined): void;\n\t\tgetWorkingLoaderMessage(): string;\n\t\tcreateWorkingLoader(): AtomicWorkingLoader;\n\t\tclearWorkingLoader(): void;\n\t\tstopWorkingLoader(): void;\n\t\tshowWorkingLoaderNow(): void;\n\t\tsetWorkingVisible(visible: boolean): void;\n\t\tsetWorkingIndicator(options?: LoaderIndicatorOptions): void;\n\t\tsetHiddenThinkingLabel(label?: string): void;\n\t\tsetExtensionWidget(\n\t\t\tkey: string,\n\t\t\tcontent: string[] | ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined,\n\t\t\toptions?: ExtensionWidgetOptions,\n\t\t): void;\n\t\tclearExtensionWidgets(): void;\n\t\tresetExtensionUI(): void;\n\t\trenderWidgets(): void;\n\t\trenderWidgetContainer(\n\t\t\tcontainer: Container,\n\t\t\twidgets: Map<string, Component & { dispose?(): void }>,\n\t\t\tspacerWhenEmpty: boolean,\n\t\t\tleadingSpacer: boolean,\n\t\t): void;\n\t\tsetExtensionFooter(\n\t\t\tfactory:\n\t\t\t\t| ((tui: TUI, thm: Theme, footerData: ReadonlyFooterDataProvider) => Component & { dispose?(): void })\n\t\t\t\t| undefined,\n\t\t): void;\n\t\tsetExtensionHeader(factory: ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined): void;\n\t\taddExtensionTerminalInputListener(\n\t\t\thandler: (data: string) => { consume?: boolean; data?: string } | undefined,\n\t\t): () => void;\n\t\tclearExtensionTerminalInputListeners(): void;\n\t\tgetHostCustomUiState(): HostCustomUiState;\n\t\tnotifyHostCustomUiStateListeners(): void;\n\t\tbeginHostInlineCustomUi(purpose?: \"prompt\" | \"navigation\"): () => void;\n\t\tbeginInlineCustomUiFocusDeferral(): () => void;\n\t\tshouldDeferInlineCustomUiFocus(): boolean;\n\t\tfocusHostInlineCustomUi(): boolean;\n\t\tonHostCustomUiStateChange(listener: HostCustomUiStateListener): () => void;\n\t\tonExtensionWidgetRelease(key: string, listener: () => void): () => void;\n\t\tnotifyExtensionWidgetRelease(key: string): void;\n\t\tcreateProjectTrustContext(cwd: string): ProjectTrustContext;\n\t\tcreateExtensionUIContext(): ExtensionUIContext;\n\t\tshowExtensionSelector(\n\t\t\ttitle: string,\n\t\t\toptions: string[],\n\t\t\topts?: ExtensionUIDialogOptions,\n\t\t): Promise<string | undefined>;\n\t\thideExtensionSelector(instance?: ExtensionSelectorComponent): void;\n\t\tshowExtensionConfirm(title: string, message: string, opts?: ExtensionUIDialogOptions): Promise<boolean>;\n\t\tpromptForMissingSessionCwd(error: MissingSessionCwdError): Promise<string | undefined>;\n\t\tshowExtensionInput(\n\t\t\ttitle: string,\n\t\t\tplaceholder?: string,\n\t\t\topts?: ExtensionUIDialogOptions,\n\t\t): Promise<string | undefined>;\n\t\thideExtensionInput(instance?: ExtensionInputComponent): void;\n\t\tshowExtensionEditor(\n\t\t\ttitle: string,\n\t\t\tprefill?: string,\n\t\t\topts?: ExtensionUIDialogOptions,\n\t\t): Promise<string | undefined>;\n\t\thideExtensionEditor(instance?: ExtensionEditorComponent): void;\n\t\tsetCustomEditorComponent(factory: EditorFactory | undefined): void;\n\t\tshowExtensionNotify(message: string, type?: \"info\" | \"warning\" | \"error\"): void;\n\t\tshowExtensionCustom<T>(\n\t\t\tfactory: (\n\t\t\t\ttui: TUI,\n\t\t\t\ttheme: Theme,\n\t\t\t\tkeybindings: KeybindingsManager,\n\t\t\t\tdone: (result: T) => void,\n\t\t\t) => (Component & { dispose?(): void }) | Promise<Component & { dispose?(): void }>,\n\t\t\toptions?: {\n\t\t\t\tpurpose?: \"prompt\" | \"navigation\";\n\t\t\t\toverlay?: boolean;\n\t\t\t\tdeferInlineCustomUiFocus?: boolean;\n\t\t\t\thandlesInternalUiAction?: boolean;\n\t\t\t\t/** Overlay-only: bound the overlay and reserve transcript scroll extent. */\n\t\t\t\treserveTranscriptRows?: boolean;\n\t\t\t\tsignal?: AbortSignal;\n\t\t\t\toverlayOptions?: OverlayOptions | (() => OverlayOptions);\n\t\t\t\tonHandle?: (handle: OverlayHandle) => void;\n\t\t\t},\n\t\t): Promise<T>;\n\t\tshowExtensionError(extensionPath: string, error: string, stack?: string): void;\n\t\tsetupKeyHandlers(): void;\n\t\thandleClipboardImagePaste(): Promise<void>;\n\t\tsetupEditorSubmitHandler(): void;\n\t\tdeliverStartupReplayPrompt(text: string): void;\n\t\trecoverCookedStartupInput(): boolean;\n\t\tdrainStartupReplayCommands(): Promise<void>;\n\t\tadvanceStartupInputReplay(submittedText: string): void;\n\t\tsubscribeToAgent(): void;\n\t\thandleEvent(event: AgentSessionEvent | JsonAgentSessionEvent): Promise<void>;\n\t\tgetUserMessageText(message: Message): string;\n\t\tshowStatus(message: string, persist?: boolean): void;\n\t\t/** Report a managed-tool (fd/rg) readiness update inside the transcript. */\n\t\tshowManagedToolStatus(status: ToolStatus): void;\n\t\t/** Bring fd/rg to readiness after first paint; progress lands in the transcript. */\n\t\tensureManagedToolsReady(): Promise<void>;\n\t\tchatMessageRenderOptions(): ChatMessageRenderOptions;\n\t\taddRenderedChatEntry(entry: ChatMessageEntry): Component;\n\t\taddCompactionBoundaryToChat(result: VerbatimCompactionResult): void;\n\t\taddCompactionCostNotice(kind: \"compaction\" | \"branch_summary\", usage: Usage): void;\n\t\tmaybeShowAssistantDiagnostics(message: AssistantMessage): void;\n\t\taddMessageToChat(message: AgentMessage, options?: { populateHistory?: boolean }): void;\n\t\taddCustomEntryToChat(entry: CustomEntry): void;\n\t\trenderSessionContext(\n\t\t\tsessionContext: SessionContext,\n\t\t\toptions?: { updateFooter?: boolean; populateHistory?: boolean },\n\t\t): void;\n\t\trenderSessionEntries(\n\t\t\tentries: SessionEntry[],\n\t\t\toptions?: {\n\t\t\t\tupdateFooter?: boolean;\n\t\t\t\tpopulateHistory?: boolean;\n\t\t\t\tsuppressCompactionBoundary?: VerbatimCompactionResult;\n\t\t\t},\n\t\t): void;\n\t\trenderInitialMessages(): void;\n\t\tattachStartupNoticesContainer(options?: { resetDetached?: boolean }): void;\n\t\tgetUserInput(): Promise<InteractiveSubmission>;\n\t\trunUserPromptTurn(submission: InteractiveSubmission | string): Promise<void>;\n\t\trenderDeferredUserInput(text: string): void;\n\t\tconsumeDeferredRenderedUserInput(text: string): boolean;\n\t\tdiscardDeferredRenderedUserInput(text: string): void;\n\t\tensureDeferredStartupComplete(): Promise<void>;\n\t\trebuildChatFromMessages(options?: {\n\t\t\tsuppressCompactionBoundary?: VerbatimCompactionResult;\n\t\t\tresetStartupDisclosure?: boolean;\n\t\t}): void;\n\t\thandleCtrlC(): void;\n\t\tinterruptActiveOperation(): boolean;\n\t\thandleCtrlD(): void;\n\t\tshutdown(options?: { fromSignal?: boolean }): Promise<void>;\n\t\temergencyTerminalExit(): never;\n\t\tuncaughtCrash(error: Error): never;\n\t\tgetCrashExtensionHint(error: unknown): string | undefined;\n\t\tcheckShutdownRequested(): Promise<void>;\n\t\tregisterSignalHandlers(): void;\n\t\tunregisterSignalHandlers(): void;\n\t\thandleCtrlZ(): void;\n\t\thandleFollowUp(): Promise<void>;\n\t\thandleDequeue(): void;\n\t\trefreshBuiltInHeader(): void;\n\t\tupdateEditorBorderColor(): void;\n\t\tcycleThinkingLevel(): void;\n\t\tcycleModel(direction: \"forward\" | \"backward\"): Promise<void>;\n\t\ttoggleToolOutputExpansion(): void;\n\t\tsetToolsExpanded(expanded: boolean): void;\n\t\ttoggleThinkingBlockVisibility(): void;\n\t\tupdateThinkingBlockVisibility(): void;\n\t\topenExternalEditor(): Promise<void>;\n\t\tclearEditor(): void;\n\t\tshowError(errorMessage: string): void;\n\t\tshowWarning(warningMessage: string, targetContainer?: Container): void;\n\t\tshowNewVersionNotification(newVersion: string, targetContainer?: Container): void;\n\t\tshowPackageUpdateNotification(packages: string[], targetContainer?: Container): void;\n\t\tgetAllQueuedMessages(): { steering: string[]; followUp: string[] };\n\t\tclearAllQueues(options?: { preserveUnprotectedCustomMessages?: boolean }): {\n\t\t\tsteering: string[];\n\t\t\tfollowUp: string[];\n\t\t};\n\t\tupdatePendingMessagesDisplay(): void;\n\t\trestoreQueuedMessagesToEditor(options?: {\n\t\t\tabort?: boolean;\n\t\t\tcurrentText?: string;\n\t\t\tpreserveUnprotectedCustomMessages?: boolean;\n\t\t}): number;\n\t\tqueueCompactionMessage(text: string, mode: \"steer\" | \"followUp\"): void;\n\t\tisExtensionCommand(text: string): boolean;\n\t\tflushCompactionQueue(options?: { willRetry?: boolean }): Promise<void>;\n\t\tflushPendingBashComponents(): void;\n\t\tshowSelector(\n\t\t\tcreate: (done: () => void) => { component: Component; focus: Component; dispose?: () => void },\n\t\t): void;\n\t\tshowSettingsSelector(): void;\n\t\thandleModelCommand(searchTerm?: string): Promise<void>;\n\t\thandleThinkingCommand(searchTerm?: string): void;\n\t\tselectThinkingLevel(level: ThinkingLevel): void;\n\t\tshowThinkingSelector(): void;\n\t\tfindExactModelMatch(searchTerm: string): Promise<Model<Api> | undefined>;\n\t\tgetModelCandidates(): Promise<Model<Api>[]>;\n\t\tupdateAvailableProviderCount(): Promise<void>;\n\t\tmaybeWarnAboutAnthropicSubscriptionAuth(\n\t\t\tmodel?: Model<Api> | undefined,\n\t\t\ttargetContainer?: Container,\n\t\t): Promise<void>;\n\t\tshowModelSelector(initialSearchInput?: string): void;\n\t\tshowModelsSelector(): void;\n\t\tshowUserMessageSelector(): Promise<void>;\n\t\thandleCloneCommand(): Promise<void>;\n\t\tmaybeSaveImplicitProjectTrustAfterReload(): boolean;\n\t\tshowTrustSelector(): void;\n\t\tshowTreeSelector(initialSelectedId?: string): Promise<void>;\n\t\tshowSessionSelector(): void;\n\t\thandleResumeSession(\n\t\t\tsessionPath: string,\n\t\t\toptions?: Parameters<ExtensionCommandContext[\"switchSession\"]>[1],\n\t\t): Promise<{ cancelled: boolean }>;\n\t\tgetLoginProviderOptions(authType?: \"oauth\" | \"api_key\"): AuthSelectorProvider[];\n\t\tgetLogoutProviderOptions(): AuthSelectorProvider[];\n\t\thandleLoginCommand(providerRef?: string): Promise<void>;\n\t\tstartProviderLogin(providerOption: AuthSelectorProvider, onBack?: () => void): Promise<void>;\n\t\tshowLoginAuthTypeSelector(providerOptions?: AuthSelectorProvider[]): void;\n\t\tshowLoginProviderSelector(authType?: \"oauth\" | \"api_key\", initialSearchInput?: string): void;\n\t\tshowOAuthSelector(mode: \"login\" | \"logout\", initialSearchInput?: string): Promise<void>;\n\t\tcompleteProviderAuthentication(\n\t\t\tproviderId: string,\n\t\t\tproviderName: string,\n\t\t\tauthType: \"oauth\" | \"api_key\",\n\t\t\tpreviousModel: Model<Api> | undefined,\n\t\t\toptions?: { modelsRefreshed?: boolean },\n\t\t): Promise<void>;\n\t\tshowBedrockSetupDialog(providerId: string, providerName: string, onBack?: () => void): void;\n\t\tshowApiKeyLoginDialog(providerId: string, providerName: string, onBack?: () => void): Promise<void>;\n\t\tshowOAuthLoginSelect(dialog: LoginDialogComponent, prompt: OAuthSelectPrompt): Promise<string | undefined>;\n\t\tshowLoginDialog(providerId: string, providerName: string, onBack?: () => void): Promise<void>;\n\t\thandleReloadCommand(): Promise<void>;\n\t\thandleExportCommand(text: string): Promise<void>;\n\t\tgetPathCommandArgument(text: string, command: \"/export\" | \"/import\"): string | undefined;\n\t\thandleImportCommand(text: string): Promise<void>;\n\t\thandleShareCommand(): Promise<void>;\n\t\thandleCopyCommand(): Promise<void>;\n\t\thandleNameCommand(text: string): void;\n\t\thandleSessionCommand(): void;\n\t\thandleChangelogCommand(): void;\n\t\tgetAppKeyDisplay(action: AppKeybinding): string;\n\t\tgetEditorKeyDisplay(action: Keybinding): string;\n\t\tjumpToTranscriptEnd(): void;\n\t\tsetFullscreenCopyOnSelect(enabled: boolean): void;\n\t\thandleHotkeysCommand(): void;\n\t\thandleClearCommand(): Promise<void>;\n\t\thandleDebugCommand(): void;\n\t\thandleArminSaysHi(): void;\n\t\thandleDementedDelves(): void;\n\t\thandleDaxnuts(): void;\n\t\tcheckDaxnutsEasterEgg(model: { provider: string; id: string }): void;\n\t\thandleBashCommand(command: string, excludeFromContext?: boolean): Promise<void>;\n\t\thandleCompactCommand(): Promise<void>;\n\t\tstop(fullscreenExitOutput?: FullscreenExitOutput): void;\n\t}\n}\n"]}
|
|
@@ -110,7 +110,7 @@ function getOverlapNoticeFingerprint(mode, overlaps) {
|
|
|
110
110
|
}
|
|
111
111
|
InteractiveModeBase.prototype.showLoadedResources = function (options) {
|
|
112
112
|
const targetContainer = options?.targetContainer ?? this.chatContainer;
|
|
113
|
-
const showListing = options?.force || this.
|
|
113
|
+
const showListing = options?.force || this.shouldShowStartupDetails();
|
|
114
114
|
const showDiagnostics = showListing || options?.showDiagnosticsWhenQuiet === true;
|
|
115
115
|
if (!showListing && !showDiagnostics) {
|
|
116
116
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-resource-rendering.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-resource-rendering.ts"],"names":[],"mappings":"AACA,OAAO,EACN,sCAAsC,EACtC,oCAAoC,GACpC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAIN,MAAM,EAEN,KAAK,GACL,MAAM,4BAA4B,CAAC;AAEpC,SAAS,UAAU,CAAC,MAAgB;IACnC,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAChE,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAClE,CAAC;AAED,SAAS,6BAA6B,CAAC,OAAiB,EAAE,cAAmC;IAC5F,MAAM,aAAa,GAAG,IAAI,GAAG,CAC5B,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CA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CAAC,CAAC;QAElD,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrC,eAAe,CAAC,QAAQ,CACvB,IAAI,UAAU,CACb,GAAG,EAAE,CACJ,GAAG,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,oBAAoB,CAAC,KAAK,IAAI,CAAC,iBAAiB,CAAC,oBAAoB,EAAE,WAAW,CAAC,EAAE,EAC7G,CAAC,EACD,CAAC,CACD,CACD,CAAC;YACF,eAAe,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC;QAED,MAAM,gBAAgB,GAAG,YAAY,CAAC,WAAW,CAAC;QAClD,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjC,eAAe,CAAC,QAAQ,CACvB,IAAI,UAAU,CACb,GAAG,EAAE,CACJ,GAAG,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC,KAAK,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAE,EACxG,CAAC,EACD,CAAC,CACD,CACD,CAAC;YACF,eAAe,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC;IACF,CAAC;AACF,CAAC,CAAC","sourcesContent":["import type { ResourceOverlap } from \"../../core/diagnostics.ts\";\nimport {\n\tgetInteractiveEngineResourceExtensions,\n\tgetInteractiveEngineResourceOverlaps,\n} from \"../interactive-engine/extension-ui-bridge.ts\";\nimport { ThemedText } from \"./components/themed-text.js\";\nimport { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport {\n\ttype Container,\n\ttype ResourceDiagnostic,\n\ttype SourceInfo,\n\tSpacer,\n\ttype Text,\n\ttheme,\n} from \"./interactive-mode-deps.ts\";\n\nfunction formatList(values: string[]): string {\n\tif (values.length <= 1) return values[0] ?? \"\";\n\tif (values.length === 2) return `${values[0]} and ${values[1]}`;\n\treturn `${values.slice(0, -1).join(\", \")}, and ${values.at(-1)}`;\n}\n\nfunction getShortestUniqueSourceLabels(sources: string[], reservedLabels: ReadonlySet<string>): Map<string, string> {\n\tconst partsBySource = new Map(\n\t\tsources.map((source) => [source, source.replace(/\\\\/g, \"/\").split(\"/\").filter(Boolean)]),\n\t);\n\tconst depthBySource = new Map(sources.map((source) => [source, 1]));\n\twhile (true) {\n\t\tconst groups = new Map<string, string[]>();\n\t\tfor (const source of sources) {\n\t\t\tconst parts = partsBySource.get(source) ?? [source];\n\t\t\tconst depth = depthBySource.get(source) ?? 1;\n\t\t\tconst label = parts.slice(-depth).join(\"/\") || source;\n\t\t\tgroups.set(label, [...(groups.get(label) ?? []), source]);\n\t\t}\n\t\tconst duplicates = [...groups].filter(([label, group]) => group.length > 1 || reservedLabels.has(label));\n\t\tif (duplicates.length === 0) {\n\t\t\treturn new Map(\n\t\t\t\tsources.map((source) => {\n\t\t\t\t\tconst parts = partsBySource.get(source) ?? [source];\n\t\t\t\t\treturn [source, parts.slice(-(depthBySource.get(source) ?? 1)).join(\"/\") || source];\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\tlet expanded = false;\n\t\tfor (const [, group] of duplicates) {\n\t\t\tfor (const source of group) {\n\t\t\t\tconst maxDepth = partsBySource.get(source)?.length ?? 1;\n\t\t\t\tconst depth = depthBySource.get(source) ?? 1;\n\t\t\t\tif (depth < maxDepth) {\n\t\t\t\t\tdepthBySource.set(source, depth + 1);\n\t\t\t\t\texpanded = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!expanded) return new Map(sources.map((source) => [source, source]));\n\t}\n}\n\nfunction getExtensionIdentityPath(resourcePath: string): string {\n\tconst normalized = resourcePath.replace(/\\\\/g, \"/\");\n\tconst segments = normalized.split(\"/\").filter(Boolean);\n\tif (/^index\\.[cm]?[jt]sx?$/.test(segments.at(-1) ?? \"\")) segments.pop();\n\treturn segments.join(\"/\") || normalized;\n}\n\nfunction mergeExtensions(\n\thostExtensions: ReadonlyArray<{ path: string; sourceInfo?: SourceInfo; hidden?: boolean }>,\n\tengineExtensions: ReadonlyArray<{ path: string; sourceInfo?: SourceInfo; hidden?: boolean }>,\n): Array<{ path: string; sourceInfo?: SourceInfo }> {\n\tconst merged: Array<{ path: string; sourceInfo?: SourceInfo }> = [];\n\tconst indexByIdentity = new Map<string, number>();\n\tconst hiddenIdentities = new Set<string>();\n\tfor (const extension of [...hostExtensions, ...engineExtensions]) {\n\t\tconst identity = getExtensionIdentityPath(extension.path);\n\t\tif (extension.hidden === true) hiddenIdentities.add(identity);\n\t\tconst existingIndex = indexByIdentity.get(identity);\n\t\tif (existingIndex === undefined) {\n\t\t\tindexByIdentity.set(identity, merged.length);\n\t\t\tmerged.push({ path: extension.path, sourceInfo: extension.sourceInfo });\n\t\t\tcontinue;\n\t\t}\n\t\tconst existing = merged[existingIndex];\n\t\tif (existing && !existing.sourceInfo && extension.sourceInfo) {\n\t\t\tmerged[existingIndex] = { ...existing, sourceInfo: extension.sourceInfo };\n\t\t}\n\t}\n\treturn merged.filter((extension) => !hiddenIdentities.has(getExtensionIdentityPath(extension.path)));\n}\n\nfunction getOverlapLabels(mode: InteractiveModeBase, overlaps: readonly ResourceOverlap[]): string[] {\n\tconst labels = new Set<string>();\n\tconst localPackageSources = new Set<string>();\n\tconst extensionSources = new Set<string>();\n\tfor (const overlap of overlaps) {\n\t\tconst sourceInfo = overlap.inherited;\n\t\tif (sourceInfo.origin !== \"package\") {\n\t\t\textensionSources.add(getExtensionIdentityPath(sourceInfo.path));\n\t\t\tcontinue;\n\t\t}\n\t\tif (!mode.isPackageSource(sourceInfo)) {\n\t\t\tlocalPackageSources.add(sourceInfo.source);\n\t\t\tcontinue;\n\t\t}\n\t\tconst label = mode.getCompactPackageSourceLabel(sourceInfo);\n\t\tif (label) labels.add(label);\n\t}\n\tfor (const label of getShortestUniqueSourceLabels([...localPackageSources], labels).values()) labels.add(label);\n\tfor (const label of getShortestUniqueSourceLabels([...extensionSources], labels).values()) labels.add(label);\n\treturn [...labels];\n}\ninterface DisplayedOverlapNotice {\n\tcomponent: Text;\n\tcontainer: Container;\n\tfingerprint: string;\n}\n\nconst displayedOverlapNotices = new WeakMap<InteractiveModeBase, DisplayedOverlapNotice>();\n\nfunction getOverlapNoticeFingerprint(\n\tmode: InteractiveModeBase,\n\toverlaps: readonly ResourceOverlap[],\n): string | undefined {\n\tif (overlaps.length === 0) return undefined;\n\tconst fingerprint = overlaps\n\t\t.map((overlap) => `${overlap.resourceType}:${overlap.name}:${overlap.inherited.path}:${overlap.bundled.path}`)\n\t\t.sort()\n\t\t.join(\"\\n\");\n\tconst displayed = displayedOverlapNotices.get(mode);\n\tif (displayed?.fingerprint === fingerprint && displayed.container.children.includes(displayed.component)) {\n\t\treturn undefined;\n\t}\n\treturn fingerprint;\n}\n\nInteractiveModeBase.prototype.showLoadedResources = function (\n\tthis: InteractiveModeBase,\n\toptions?: {\n\t\textensions?: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\tforce?: boolean;\n\t\tshowDiagnosticsWhenQuiet?: boolean;\n\t\ttargetContainer?: Container;\n\t},\n): void {\n\tconst targetContainer = options?.targetContainer ?? this.chatContainer;\n\tconst showListing = options?.force || this.options.verbose || !this.settingsManager.getQuietStartup();\n\tconst showDiagnostics = showListing || options?.showDiagnosticsWhenQuiet === true;\n\tif (!showListing && !showDiagnostics) {\n\t\treturn;\n\t}\n\tif (targetContainer === this.resourceDisclosureContainer) targetContainer.clear();\n\n\tconst skillsResult = this.session.resourceLoader.getSkills();\n\tconst promptsResult = this.session.resourceLoader.getPrompts();\n\tconst themesResult = this.session.resourceLoader.getThemes();\n\tconst hostExtensions =\n\t\toptions?.extensions ??\n\t\tthis.session.resourceLoader.getExtensions().extensions.map((extension) => ({\n\t\t\tpath: extension.path,\n\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\thidden: extension.hidden,\n\t\t}));\n\tconst extensions = mergeExtensions(hostExtensions, getInteractiveEngineResourceExtensions(this.runtimeHost));\n\tconst sourceInfos = new Map<string, SourceInfo>();\n\tfor (const extension of extensions) {\n\t\tif (extension.sourceInfo) {\n\t\t\tsourceInfos.set(extension.path, extension.sourceInfo);\n\t\t}\n\t}\n\tfor (const skill of skillsResult.skills) {\n\t\tif (skill.sourceInfo) {\n\t\t\tsourceInfos.set(skill.filePath, skill.sourceInfo);\n\t\t}\n\t}\n\tfor (const prompt of promptsResult.prompts) {\n\t\tif (prompt.sourceInfo) {\n\t\t\tsourceInfos.set(prompt.filePath, prompt.sourceInfo);\n\t\t}\n\t}\n\tfor (const loadedTheme of themesResult.themes) {\n\t\tif (loadedTheme.sourcePath && loadedTheme.sourceInfo) {\n\t\t\tsourceInfos.set(loadedTheme.sourcePath, loadedTheme.sourceInfo);\n\t\t}\n\t}\n\n\tif (showListing) {\n\t\t// SYSTEM.md / APPEND_SYSTEM.md shape the prompt exactly like AGENTS.md does,\n\t\t// so the startup CONTEXT listing names them too.\n\t\tconst systemPromptSource = this.session.resourceLoader.getSystemPromptSource();\n\t\tconst contextFiles = [\n\t\t\t...(systemPromptSource ? [systemPromptSource] : []),\n\t\t\t...this.session.resourceLoader.getAppendSystemPromptSources(),\n\t\t\t...this.session.resourceLoader.getAgentsFiles().agentsFiles,\n\t\t];\n\n\t\tconst expandedSections: {\n\t\t\tcontext?: string;\n\t\t\tskills?: string;\n\t\t\tprompts?: string;\n\t\t\textensions?: string;\n\t\t} = {};\n\t\tif (contextFiles.length > 0) {\n\t\t\texpandedSections.context = contextFiles\n\t\t\t\t.map((contextFile) => theme.fg(\"dim\", ` ${this.formatDisplayPath(contextFile.path)}`))\n\t\t\t\t.join(\"\\n\");\n\t\t}\n\n\t\tconst skills = skillsResult.skills;\n\t\tif (skills.length > 0) {\n\t\t\tconst groups = this.buildScopeGroups(\n\t\t\t\tskills.map((skill) => ({\n\t\t\t\t\tpath: skill.filePath,\n\t\t\t\t\tsourceInfo: skill.sourceInfo,\n\t\t\t\t})),\n\t\t\t);\n\t\t\texpandedSections.skills = this.formatScopeGroups(groups, {\n\t\t\t\tformatPath: (item) => this.formatDisplayPath(item.path),\n\t\t\t\tformatPackagePath: (item) => this.getShortPath(item.path, item.sourceInfo),\n\t\t\t});\n\t\t}\n\n\t\tconst prompts = promptsResult.prompts;\n\t\tconst promptEntries = prompts.map((prompt) => ({\n\t\t\tpath: prompt.filePath,\n\t\t\tsourceInfo: prompt.sourceInfo,\n\t\t\tlabel: `/${prompt.name}`,\n\t\t}));\n\t\tif (promptEntries.length > 0) {\n\t\t\tconst groups = this.buildScopeGroups(promptEntries);\n\t\t\tconst promptByPath = new Map(promptEntries.map((prompt) => [prompt.path, prompt.label]));\n\t\t\texpandedSections.prompts = this.formatScopeGroups(groups, {\n\t\t\t\tformatPath: (item) => promptByPath.get(item.path) ?? this.formatDisplayPath(item.path),\n\t\t\t\tformatPackagePath: (item) => promptByPath.get(item.path) ?? this.formatDisplayPath(item.path),\n\t\t\t});\n\t\t}\n\n\t\tif (extensions.length > 0) {\n\t\t\tconst groups = this.buildScopeGroups(extensions);\n\t\t\texpandedSections.extensions = this.formatScopeGroups(groups, {\n\t\t\t\tformatPath: (item) => this.formatExtensionDisplayPath(item.path),\n\t\t\t\tformatPackagePath: (item) => this.formatExtensionDisplayPath(this.getShortPath(item.path, item.sourceInfo)),\n\t\t\t});\n\t\t}\n\n\t\tthis.addResourceDisclosure({\n\t\t\tcontextFiles,\n\t\t\tskills,\n\t\t\tprompts,\n\t\t\textensions,\n\t\t\texpandedSections,\n\t\t\ttargetContainer,\n\t\t});\n\t}\n\n\tif (showDiagnostics) {\n\t\tconst overlaps = [\n\t\t\t...(this.session.resourceLoader.getExtensions().overlaps ?? []),\n\t\t\t...getInteractiveEngineResourceOverlaps(this.runtimeHost),\n\t\t];\n\t\tconst overlapLabels = getOverlapLabels(this, overlaps);\n\t\tconst overlapFingerprint = getOverlapNoticeFingerprint(this, overlaps);\n\t\tif (overlapFingerprint && overlapLabels.length > 0) {\n\t\t\tconst sources = formatList(overlapLabels.map((label) => `\\`${label}\\``));\n\t\t\tconst verb = overlapLabels.length === 1 ? \"provides\" : \"provide\";\n\t\t\tconst notice = new ThemedText(\n\t\t\t\t() =>\n\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\"warning\",\n\t\t\t\t\t\t`Extension overlap detected: ${sources} ${verb} resources already bundled with Atomic. Atomic kept its bundled versions; non-conflicting extension features remain available.`,\n\t\t\t\t\t),\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t);\n\t\t\ttargetContainer.addChild(notice);\n\t\t\tdisplayedOverlapNotices.set(this, {\n\t\t\t\tcomponent: notice,\n\t\t\t\tcontainer: targetContainer,\n\t\t\t\tfingerprint: overlapFingerprint,\n\t\t\t});\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\n\t\tconst skillDiagnostics = skillsResult.diagnostics;\n\t\tif (skillDiagnostics.length > 0) {\n\t\t\ttargetContainer.addChild(\n\t\t\t\tnew ThemedText(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t`${theme.fg(\"warning\", \"[Skill conflicts]\")}\\n${this.formatDiagnostics(skillDiagnostics, sourceInfos)}`,\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\n\t\tconst promptDiagnostics = promptsResult.diagnostics;\n\t\tif (promptDiagnostics.length > 0) {\n\t\t\ttargetContainer.addChild(\n\t\t\t\tnew ThemedText(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t`${theme.fg(\"warning\", \"[Prompt conflicts]\")}\\n${this.formatDiagnostics(promptDiagnostics, sourceInfos)}`,\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\n\t\tconst extensionDiagnostics: ResourceDiagnostic[] = [];\n\t\tconst extensionsResult = this.session.resourceLoader.getExtensions();\n\t\tfor (const error of extensionsResult.errors) {\n\t\t\textensionDiagnostics.push({ type: \"error\", message: error.error, path: error.path });\n\t\t}\n\t\tfor (const warning of extensionsResult.warnings ?? []) {\n\t\t\textensionDiagnostics.push({ type: \"warning\", message: warning.warning, path: warning.path });\n\t\t}\n\n\t\tconst commandDiagnostics = this.session.extensionRunner.getCommandDiagnostics();\n\t\textensionDiagnostics.push(...commandDiagnostics);\n\t\textensionDiagnostics.push(...this.getBuiltInCommandConflictDiagnostics(this.session.extensionRunner));\n\n\t\tconst shortcutDiagnostics = this.session.extensionRunner.getShortcutDiagnostics();\n\t\textensionDiagnostics.push(...shortcutDiagnostics);\n\n\t\tif (extensionDiagnostics.length > 0) {\n\t\t\ttargetContainer.addChild(\n\t\t\t\tnew ThemedText(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t`${theme.fg(\"warning\", \"[Extension issues]\")}\\n${this.formatDiagnostics(extensionDiagnostics, sourceInfos)}`,\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\n\t\tconst themeDiagnostics = themesResult.diagnostics;\n\t\tif (themeDiagnostics.length > 0) {\n\t\t\ttargetContainer.addChild(\n\t\t\t\tnew ThemedText(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t`${theme.fg(\"warning\", \"[Theme conflicts]\")}\\n${this.formatDiagnostics(themeDiagnostics, sourceInfos)}`,\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\t}\n};\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-resource-rendering.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-resource-rendering.ts"],"names":[],"mappings":"AACA,OAAO,EACN,sCAAsC,EACtC,oCAAoC,GACpC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,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AE,CAAC,SAAS,EAAE,mBAAmB,CAAC,KAAK,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAE,EACxG,CAAC,EACD,CAAC,CACD,CACD,CAAC;YACF,eAAe,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC;IACF,CAAC;AACF,CAAC,CAAC","sourcesContent":["import type { ResourceOverlap } from \"../../core/diagnostics.ts\";\nimport {\n\tgetInteractiveEngineResourceExtensions,\n\tgetInteractiveEngineResourceOverlaps,\n} from \"../interactive-engine/extension-ui-bridge.ts\";\nimport { ThemedText } from \"./components/themed-text.js\";\nimport { InteractiveModeBase } from \"./interactive-mode-base.ts\";\nimport {\n\ttype Container,\n\ttype ResourceDiagnostic,\n\ttype SourceInfo,\n\tSpacer,\n\ttype Text,\n\ttheme,\n} from \"./interactive-mode-deps.ts\";\n\nfunction formatList(values: string[]): string {\n\tif (values.length <= 1) return values[0] ?? \"\";\n\tif (values.length === 2) return `${values[0]} and ${values[1]}`;\n\treturn `${values.slice(0, -1).join(\", \")}, and ${values.at(-1)}`;\n}\n\nfunction getShortestUniqueSourceLabels(sources: string[], reservedLabels: ReadonlySet<string>): Map<string, string> {\n\tconst partsBySource = new Map(\n\t\tsources.map((source) => [source, source.replace(/\\\\/g, \"/\").split(\"/\").filter(Boolean)]),\n\t);\n\tconst depthBySource = new Map(sources.map((source) => [source, 1]));\n\twhile (true) {\n\t\tconst groups = new Map<string, string[]>();\n\t\tfor (const source of sources) {\n\t\t\tconst parts = partsBySource.get(source) ?? [source];\n\t\t\tconst depth = depthBySource.get(source) ?? 1;\n\t\t\tconst label = parts.slice(-depth).join(\"/\") || source;\n\t\t\tgroups.set(label, [...(groups.get(label) ?? []), source]);\n\t\t}\n\t\tconst duplicates = [...groups].filter(([label, group]) => group.length > 1 || reservedLabels.has(label));\n\t\tif (duplicates.length === 0) {\n\t\t\treturn new Map(\n\t\t\t\tsources.map((source) => {\n\t\t\t\t\tconst parts = partsBySource.get(source) ?? [source];\n\t\t\t\t\treturn [source, parts.slice(-(depthBySource.get(source) ?? 1)).join(\"/\") || source];\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\tlet expanded = false;\n\t\tfor (const [, group] of duplicates) {\n\t\t\tfor (const source of group) {\n\t\t\t\tconst maxDepth = partsBySource.get(source)?.length ?? 1;\n\t\t\t\tconst depth = depthBySource.get(source) ?? 1;\n\t\t\t\tif (depth < maxDepth) {\n\t\t\t\t\tdepthBySource.set(source, depth + 1);\n\t\t\t\t\texpanded = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!expanded) return new Map(sources.map((source) => [source, source]));\n\t}\n}\n\nfunction getExtensionIdentityPath(resourcePath: string): string {\n\tconst normalized = resourcePath.replace(/\\\\/g, \"/\");\n\tconst segments = normalized.split(\"/\").filter(Boolean);\n\tif (/^index\\.[cm]?[jt]sx?$/.test(segments.at(-1) ?? \"\")) segments.pop();\n\treturn segments.join(\"/\") || normalized;\n}\n\nfunction mergeExtensions(\n\thostExtensions: ReadonlyArray<{ path: string; sourceInfo?: SourceInfo; hidden?: boolean }>,\n\tengineExtensions: ReadonlyArray<{ path: string; sourceInfo?: SourceInfo; hidden?: boolean }>,\n): Array<{ path: string; sourceInfo?: SourceInfo }> {\n\tconst merged: Array<{ path: string; sourceInfo?: SourceInfo }> = [];\n\tconst indexByIdentity = new Map<string, number>();\n\tconst hiddenIdentities = new Set<string>();\n\tfor (const extension of [...hostExtensions, ...engineExtensions]) {\n\t\tconst identity = getExtensionIdentityPath(extension.path);\n\t\tif (extension.hidden === true) hiddenIdentities.add(identity);\n\t\tconst existingIndex = indexByIdentity.get(identity);\n\t\tif (existingIndex === undefined) {\n\t\t\tindexByIdentity.set(identity, merged.length);\n\t\t\tmerged.push({ path: extension.path, sourceInfo: extension.sourceInfo });\n\t\t\tcontinue;\n\t\t}\n\t\tconst existing = merged[existingIndex];\n\t\tif (existing && !existing.sourceInfo && extension.sourceInfo) {\n\t\t\tmerged[existingIndex] = { ...existing, sourceInfo: extension.sourceInfo };\n\t\t}\n\t}\n\treturn merged.filter((extension) => !hiddenIdentities.has(getExtensionIdentityPath(extension.path)));\n}\n\nfunction getOverlapLabels(mode: InteractiveModeBase, overlaps: readonly ResourceOverlap[]): string[] {\n\tconst labels = new Set<string>();\n\tconst localPackageSources = new Set<string>();\n\tconst extensionSources = new Set<string>();\n\tfor (const overlap of overlaps) {\n\t\tconst sourceInfo = overlap.inherited;\n\t\tif (sourceInfo.origin !== \"package\") {\n\t\t\textensionSources.add(getExtensionIdentityPath(sourceInfo.path));\n\t\t\tcontinue;\n\t\t}\n\t\tif (!mode.isPackageSource(sourceInfo)) {\n\t\t\tlocalPackageSources.add(sourceInfo.source);\n\t\t\tcontinue;\n\t\t}\n\t\tconst label = mode.getCompactPackageSourceLabel(sourceInfo);\n\t\tif (label) labels.add(label);\n\t}\n\tfor (const label of getShortestUniqueSourceLabels([...localPackageSources], labels).values()) labels.add(label);\n\tfor (const label of getShortestUniqueSourceLabels([...extensionSources], labels).values()) labels.add(label);\n\treturn [...labels];\n}\ninterface DisplayedOverlapNotice {\n\tcomponent: Text;\n\tcontainer: Container;\n\tfingerprint: string;\n}\n\nconst displayedOverlapNotices = new WeakMap<InteractiveModeBase, DisplayedOverlapNotice>();\n\nfunction getOverlapNoticeFingerprint(\n\tmode: InteractiveModeBase,\n\toverlaps: readonly ResourceOverlap[],\n): string | undefined {\n\tif (overlaps.length === 0) return undefined;\n\tconst fingerprint = overlaps\n\t\t.map((overlap) => `${overlap.resourceType}:${overlap.name}:${overlap.inherited.path}:${overlap.bundled.path}`)\n\t\t.sort()\n\t\t.join(\"\\n\");\n\tconst displayed = displayedOverlapNotices.get(mode);\n\tif (displayed?.fingerprint === fingerprint && displayed.container.children.includes(displayed.component)) {\n\t\treturn undefined;\n\t}\n\treturn fingerprint;\n}\n\nInteractiveModeBase.prototype.showLoadedResources = function (\n\tthis: InteractiveModeBase,\n\toptions?: {\n\t\textensions?: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\tforce?: boolean;\n\t\tshowDiagnosticsWhenQuiet?: boolean;\n\t\ttargetContainer?: Container;\n\t},\n): void {\n\tconst targetContainer = options?.targetContainer ?? this.chatContainer;\n\tconst showListing = options?.force || this.shouldShowStartupDetails();\n\tconst showDiagnostics = showListing || options?.showDiagnosticsWhenQuiet === true;\n\tif (!showListing && !showDiagnostics) {\n\t\treturn;\n\t}\n\tif (targetContainer === this.resourceDisclosureContainer) targetContainer.clear();\n\n\tconst skillsResult = this.session.resourceLoader.getSkills();\n\tconst promptsResult = this.session.resourceLoader.getPrompts();\n\tconst themesResult = this.session.resourceLoader.getThemes();\n\tconst hostExtensions =\n\t\toptions?.extensions ??\n\t\tthis.session.resourceLoader.getExtensions().extensions.map((extension) => ({\n\t\t\tpath: extension.path,\n\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\thidden: extension.hidden,\n\t\t}));\n\tconst extensions = mergeExtensions(hostExtensions, getInteractiveEngineResourceExtensions(this.runtimeHost));\n\tconst sourceInfos = new Map<string, SourceInfo>();\n\tfor (const extension of extensions) {\n\t\tif (extension.sourceInfo) {\n\t\t\tsourceInfos.set(extension.path, extension.sourceInfo);\n\t\t}\n\t}\n\tfor (const skill of skillsResult.skills) {\n\t\tif (skill.sourceInfo) {\n\t\t\tsourceInfos.set(skill.filePath, skill.sourceInfo);\n\t\t}\n\t}\n\tfor (const prompt of promptsResult.prompts) {\n\t\tif (prompt.sourceInfo) {\n\t\t\tsourceInfos.set(prompt.filePath, prompt.sourceInfo);\n\t\t}\n\t}\n\tfor (const loadedTheme of themesResult.themes) {\n\t\tif (loadedTheme.sourcePath && loadedTheme.sourceInfo) {\n\t\t\tsourceInfos.set(loadedTheme.sourcePath, loadedTheme.sourceInfo);\n\t\t}\n\t}\n\n\tif (showListing) {\n\t\t// SYSTEM.md / APPEND_SYSTEM.md shape the prompt exactly like AGENTS.md does,\n\t\t// so the startup CONTEXT listing names them too.\n\t\tconst systemPromptSource = this.session.resourceLoader.getSystemPromptSource();\n\t\tconst contextFiles = [\n\t\t\t...(systemPromptSource ? [systemPromptSource] : []),\n\t\t\t...this.session.resourceLoader.getAppendSystemPromptSources(),\n\t\t\t...this.session.resourceLoader.getAgentsFiles().agentsFiles,\n\t\t];\n\n\t\tconst expandedSections: {\n\t\t\tcontext?: string;\n\t\t\tskills?: string;\n\t\t\tprompts?: string;\n\t\t\textensions?: string;\n\t\t} = {};\n\t\tif (contextFiles.length > 0) {\n\t\t\texpandedSections.context = contextFiles\n\t\t\t\t.map((contextFile) => theme.fg(\"dim\", ` ${this.formatDisplayPath(contextFile.path)}`))\n\t\t\t\t.join(\"\\n\");\n\t\t}\n\n\t\tconst skills = skillsResult.skills;\n\t\tif (skills.length > 0) {\n\t\t\tconst groups = this.buildScopeGroups(\n\t\t\t\tskills.map((skill) => ({\n\t\t\t\t\tpath: skill.filePath,\n\t\t\t\t\tsourceInfo: skill.sourceInfo,\n\t\t\t\t})),\n\t\t\t);\n\t\t\texpandedSections.skills = this.formatScopeGroups(groups, {\n\t\t\t\tformatPath: (item) => this.formatDisplayPath(item.path),\n\t\t\t\tformatPackagePath: (item) => this.getShortPath(item.path, item.sourceInfo),\n\t\t\t});\n\t\t}\n\n\t\tconst prompts = promptsResult.prompts;\n\t\tconst promptEntries = prompts.map((prompt) => ({\n\t\t\tpath: prompt.filePath,\n\t\t\tsourceInfo: prompt.sourceInfo,\n\t\t\tlabel: `/${prompt.name}`,\n\t\t}));\n\t\tif (promptEntries.length > 0) {\n\t\t\tconst groups = this.buildScopeGroups(promptEntries);\n\t\t\tconst promptByPath = new Map(promptEntries.map((prompt) => [prompt.path, prompt.label]));\n\t\t\texpandedSections.prompts = this.formatScopeGroups(groups, {\n\t\t\t\tformatPath: (item) => promptByPath.get(item.path) ?? this.formatDisplayPath(item.path),\n\t\t\t\tformatPackagePath: (item) => promptByPath.get(item.path) ?? this.formatDisplayPath(item.path),\n\t\t\t});\n\t\t}\n\n\t\tif (extensions.length > 0) {\n\t\t\tconst groups = this.buildScopeGroups(extensions);\n\t\t\texpandedSections.extensions = this.formatScopeGroups(groups, {\n\t\t\t\tformatPath: (item) => this.formatExtensionDisplayPath(item.path),\n\t\t\t\tformatPackagePath: (item) => this.formatExtensionDisplayPath(this.getShortPath(item.path, item.sourceInfo)),\n\t\t\t});\n\t\t}\n\n\t\tthis.addResourceDisclosure({\n\t\t\tcontextFiles,\n\t\t\tskills,\n\t\t\tprompts,\n\t\t\textensions,\n\t\t\texpandedSections,\n\t\t\ttargetContainer,\n\t\t});\n\t}\n\n\tif (showDiagnostics) {\n\t\tconst overlaps = [\n\t\t\t...(this.session.resourceLoader.getExtensions().overlaps ?? []),\n\t\t\t...getInteractiveEngineResourceOverlaps(this.runtimeHost),\n\t\t];\n\t\tconst overlapLabels = getOverlapLabels(this, overlaps);\n\t\tconst overlapFingerprint = getOverlapNoticeFingerprint(this, overlaps);\n\t\tif (overlapFingerprint && overlapLabels.length > 0) {\n\t\t\tconst sources = formatList(overlapLabels.map((label) => `\\`${label}\\``));\n\t\t\tconst verb = overlapLabels.length === 1 ? \"provides\" : \"provide\";\n\t\t\tconst notice = new ThemedText(\n\t\t\t\t() =>\n\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\"warning\",\n\t\t\t\t\t\t`Extension overlap detected: ${sources} ${verb} resources already bundled with Atomic. Atomic kept its bundled versions; non-conflicting extension features remain available.`,\n\t\t\t\t\t),\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t);\n\t\t\ttargetContainer.addChild(notice);\n\t\t\tdisplayedOverlapNotices.set(this, {\n\t\t\t\tcomponent: notice,\n\t\t\t\tcontainer: targetContainer,\n\t\t\t\tfingerprint: overlapFingerprint,\n\t\t\t});\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\n\t\tconst skillDiagnostics = skillsResult.diagnostics;\n\t\tif (skillDiagnostics.length > 0) {\n\t\t\ttargetContainer.addChild(\n\t\t\t\tnew ThemedText(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t`${theme.fg(\"warning\", \"[Skill conflicts]\")}\\n${this.formatDiagnostics(skillDiagnostics, sourceInfos)}`,\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\n\t\tconst promptDiagnostics = promptsResult.diagnostics;\n\t\tif (promptDiagnostics.length > 0) {\n\t\t\ttargetContainer.addChild(\n\t\t\t\tnew ThemedText(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t`${theme.fg(\"warning\", \"[Prompt conflicts]\")}\\n${this.formatDiagnostics(promptDiagnostics, sourceInfos)}`,\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\n\t\tconst extensionDiagnostics: ResourceDiagnostic[] = [];\n\t\tconst extensionsResult = this.session.resourceLoader.getExtensions();\n\t\tfor (const error of extensionsResult.errors) {\n\t\t\textensionDiagnostics.push({ type: \"error\", message: error.error, path: error.path });\n\t\t}\n\t\tfor (const warning of extensionsResult.warnings ?? []) {\n\t\t\textensionDiagnostics.push({ type: \"warning\", message: warning.warning, path: warning.path });\n\t\t}\n\n\t\tconst commandDiagnostics = this.session.extensionRunner.getCommandDiagnostics();\n\t\textensionDiagnostics.push(...commandDiagnostics);\n\t\textensionDiagnostics.push(...this.getBuiltInCommandConflictDiagnostics(this.session.extensionRunner));\n\n\t\tconst shortcutDiagnostics = this.session.extensionRunner.getShortcutDiagnostics();\n\t\textensionDiagnostics.push(...shortcutDiagnostics);\n\n\t\tif (extensionDiagnostics.length > 0) {\n\t\t\ttargetContainer.addChild(\n\t\t\t\tnew ThemedText(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t`${theme.fg(\"warning\", \"[Extension issues]\")}\\n${this.formatDiagnostics(extensionDiagnostics, sourceInfos)}`,\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\n\t\tconst themeDiagnostics = themesResult.diagnostics;\n\t\tif (themeDiagnostics.length > 0) {\n\t\t\ttargetContainer.addChild(\n\t\t\t\tnew ThemedText(\n\t\t\t\t\t() =>\n\t\t\t\t\t\t`${theme.fg(\"warning\", \"[Theme conflicts]\")}\\n${this.formatDiagnostics(themeDiagnostics, sourceInfos)}`,\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t\ttargetContainer.addChild(new Spacer(1));\n\t\t}\n\t}\n};\n"]}
|
|
@@ -171,8 +171,8 @@ InteractiveModeBase.prototype.showSettingsSelector = function () {
|
|
|
171
171
|
onEnableInstallTelemetryChange: (enabled) => {
|
|
172
172
|
this.settingsManager.setEnableInstallTelemetry(enabled);
|
|
173
173
|
},
|
|
174
|
-
onQuietStartupChange: (
|
|
175
|
-
this.settingsManager.setQuietStartup(
|
|
174
|
+
onQuietStartupChange: (quiet) => {
|
|
175
|
+
this.settingsManager.setQuietStartup(quiet);
|
|
176
176
|
},
|
|
177
177
|
onDefaultProjectTrustChange: (defaultProjectTrust) => {
|
|
178
178
|
this.settingsManager.setDefaultProjectTrust(defaultProjectTrust);
|