dsh-github-copilot 0.4.0-alpha.106 → 0.4.0-alpha.107
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 +6 -0
- package/README.md +11 -9
- package/README.zh.md +11 -9
- package/deployment-baseline.json +1 -1
- package/docs/copilot-accounts.md +17 -1
- package/lib/client.js +331 -49
- package/lib/client.js.map +1 -1
- package/lib/index.js +3 -1
- package/lib/remote.js +5 -1
- package/lib/types/authorization-code-clipboard.d.ts +4 -0
- package/lib/types/client.d.ts +11 -3
- package/lib/types/copilot-accounts-card.d.ts +1 -0
- package/lib/types/copilot-accounts-remote.d.ts +1 -0
- package/lib/types/copilot-accounts-types.d.ts +1 -1
- package/lib/types/session-accounts-remote.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2989,7 +2989,7 @@ function createAccountProvider(descriptors, guard, baseURL) {
|
|
|
2989
2989
|
var package_default = {
|
|
2990
2990
|
name: "dsh-github-copilot",
|
|
2991
2991
|
description: "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
2992
|
-
version: "0.4.0-alpha.
|
|
2992
|
+
version: "0.4.0-alpha.107",
|
|
2993
2993
|
publishConfig: {
|
|
2994
2994
|
"access": "public",
|
|
2995
2995
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -4090,6 +4090,8 @@ var CopilotAccountsHost = class {
|
|
|
4090
4090
|
}
|
|
4091
4091
|
}).then(async (result) => {
|
|
4092
4092
|
if (result.status !== "authorized") return;
|
|
4093
|
+
this.operation = "verifying";
|
|
4094
|
+
this.notices = [];
|
|
4093
4095
|
const binding = this.capture(accountId);
|
|
4094
4096
|
const signal = AbortSignal.any([attemptSignal, AbortSignal.timeout(6e4)]);
|
|
4095
4097
|
const identity = await this.identity(binding, signal);
|
package/lib/remote.js
CHANGED
|
@@ -507,7 +507,11 @@ const CopilotAccountsViewSchema = z.object({
|
|
|
507
507
|
userId: z.number().int().positive().max(Number.MAX_SAFE_INTEGER)
|
|
508
508
|
}).strict().optional()
|
|
509
509
|
}).strict()).max(32),
|
|
510
|
-
operation: z.enum([
|
|
510
|
+
operation: z.enum([
|
|
511
|
+
"authorizing",
|
|
512
|
+
"verifying",
|
|
513
|
+
"switching"
|
|
514
|
+
]).optional(),
|
|
511
515
|
notices: z.array(z.object({
|
|
512
516
|
message: z.string().min(1).max(512),
|
|
513
517
|
url: z.literal("https://github.com/login/device").optional(),
|
package/lib/types/client.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export { HostedSearchSettingsCard, WebSearchRoutingCard } from './web-search-rou
|
|
|
11
11
|
export { ParentModelFollowCard } from './parent-model-follow-card.ts';
|
|
12
12
|
export { CopilotUsageCard } from './copilot-usage-card.ts';
|
|
13
13
|
import type { CopilotAccountsRemote } from './copilot-accounts-card.ts';
|
|
14
|
+
import { copyAuthorizationCode } from './authorization-code-clipboard.ts';
|
|
15
|
+
export { copyAuthorizationCode };
|
|
14
16
|
export { GitHubCopilotModelPreferencesPanel } from './model-preferences-card.ts';
|
|
15
17
|
export declare const inject: string[];
|
|
16
18
|
interface GitHubCopilotProviderCardProps extends ProviderCardExtrasOwnerProps {
|
|
@@ -18,6 +20,13 @@ interface GitHubCopilotProviderCardProps extends ProviderCardExtrasOwnerProps {
|
|
|
18
20
|
}
|
|
19
21
|
interface GitHubCopilotSettingsSectionProps extends SettingsSectionOwnerProps {
|
|
20
22
|
readonly remote: ClientContext['remote']['githubCopilot'];
|
|
23
|
+
readonly locale?: string;
|
|
24
|
+
}
|
|
25
|
+
interface LocaleReader {
|
|
26
|
+
getLocale(): {
|
|
27
|
+
active: string;
|
|
28
|
+
};
|
|
29
|
+
subscribe(listener: () => void): () => void;
|
|
21
30
|
}
|
|
22
31
|
/** Older Remote clients may not decode results: project known fields before validating our own copy. */
|
|
23
32
|
export declare function authorizationViewFrom(value: unknown): GitHubCopilotAuthorizationView | undefined;
|
|
@@ -26,10 +35,7 @@ export declare function catalogWarningOf(status: GitHubCopilotAuthorizationView
|
|
|
26
35
|
export declare function previewAssignmentMessage(status: GitHubCopilotAuthorizationView | undefined): string | undefined;
|
|
27
36
|
export declare function routeStatusMessage(status: GitHubCopilotAuthorizationView | undefined): string | undefined;
|
|
28
37
|
export declare function activeAuthorizationNotice(status: GitHubCopilotAuthorizationView | undefined): GitHubCopilotAuthorizationView['notices'][number] | undefined;
|
|
29
|
-
type ClipboardWriter = Pick<Clipboard, 'writeText'>;
|
|
30
38
|
type CopyState = 'idle' | 'copying' | 'copied' | 'failed';
|
|
31
|
-
/** Copy a one-time authorization code through the browser clipboard boundary. */
|
|
32
|
-
export declare function copyAuthorizationCode(code: string, clipboard?: ClipboardWriter): Promise<void>;
|
|
33
39
|
interface AuthorizationNoticeProps {
|
|
34
40
|
readonly message: string;
|
|
35
41
|
readonly url?: string;
|
|
@@ -66,6 +72,7 @@ export declare function GitHubCopilotAccountModelsPanel(props: {
|
|
|
66
72
|
interface GitHubCopilotPreviewFooterProps {
|
|
67
73
|
readonly remote: ClientContext['remote']['githubCopilot'];
|
|
68
74
|
readonly accountsRemote?: CopilotAccountsRemote;
|
|
75
|
+
readonly locale?: string;
|
|
69
76
|
/** A slot coordinator owns this controller's attachment across surface handoffs. */
|
|
70
77
|
readonly account?: ReturnType<typeof createCompactAccount>;
|
|
71
78
|
readonly embedded?: boolean;
|
|
@@ -103,6 +110,7 @@ export declare function GitHubCopilotAccountSurface(props: GitHubCopilotPreviewF
|
|
|
103
110
|
readonly surfaces: ReturnType<typeof createAccountSurfaces>;
|
|
104
111
|
readonly seat: AccountSurfaceSeat;
|
|
105
112
|
readonly eligible?: boolean;
|
|
113
|
+
readonly localeReader?: LocaleReader;
|
|
106
114
|
}): ReactElement | null;
|
|
107
115
|
/** Unified fallback when the Models footer extension is absent or incompatible. */
|
|
108
116
|
export declare function GitHubCopilotSettingsSection(props: GitHubCopilotSettingsSectionProps): ReturnType<typeof createElement>;
|
|
@@ -25,7 +25,7 @@ export interface CopilotAccountsView {
|
|
|
25
25
|
readonly writable: boolean;
|
|
26
26
|
readonly switchable: boolean;
|
|
27
27
|
readonly accounts: readonly CopilotAccountView[];
|
|
28
|
-
readonly operation?: 'authorizing' | 'switching';
|
|
28
|
+
readonly operation?: 'authorizing' | 'verifying' | 'switching';
|
|
29
29
|
readonly notices: readonly CopilotAccountsNotice[];
|
|
30
30
|
readonly diagnostic?: CopilotAccountsDiagnostic;
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-github-copilot",
|
|
3
3
|
"description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
4
|
-
"version": "0.4.0-alpha.
|
|
4
|
+
"version": "0.4.0-alpha.107",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"registry": "https://registry.npmjs.org/",
|