display version in assistants select
This commit is contained in:
parent
b7b5701fa7
commit
5e91e466eb
6 changed files with 29 additions and 3 deletions
|
|
@ -134,6 +134,7 @@ export class ConfigHandler {
|
|||
{ ...assistant.configResult, config: renderedConfig },
|
||||
assistant.ownerSlug,
|
||||
assistant.packageSlug,
|
||||
assistant.configResult.config?.version ?? "latest",
|
||||
this.controlPlaneClient,
|
||||
this.ide,
|
||||
this.ideSettingsPromise,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
import { ConfigResult, ConfigValidationError } from "@continuedev/config-yaml";
|
||||
import {
|
||||
ConfigResult,
|
||||
ConfigValidationError,
|
||||
FullSlug,
|
||||
} from "@continuedev/config-yaml";
|
||||
import {
|
||||
BrowserSerializedContinueConfig,
|
||||
ContinueConfig,
|
||||
|
|
@ -9,6 +13,8 @@ import { finalToBrowserConfig } from "./load.js";
|
|||
import { IProfileLoader } from "./profile/IProfileLoader.js";
|
||||
|
||||
export interface ProfileDescription {
|
||||
fullSlug: FullSlug;
|
||||
profileType: string;
|
||||
title: string;
|
||||
id: string;
|
||||
errors: ConfigValidationError[] | undefined;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@ export default class ControlPlaneProfileLoader implements IProfileLoader {
|
|||
) {
|
||||
this.description = {
|
||||
id: workspaceId,
|
||||
profileType: "control-plane",
|
||||
fullSlug: {
|
||||
ownerSlug: "",
|
||||
packageSlug: "",
|
||||
versionSlug: "",
|
||||
},
|
||||
title: workspaceTitle,
|
||||
errors: undefined,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@ export default class LocalProfileLoader implements IProfileLoader {
|
|||
static ID = "local";
|
||||
description: ProfileDescription = {
|
||||
id: LocalProfileLoader.ID,
|
||||
profileType: LocalProfileLoader.ID,
|
||||
fullSlug: {
|
||||
ownerSlug: "",
|
||||
packageSlug: "",
|
||||
versionSlug: "",
|
||||
},
|
||||
title: "Local Config",
|
||||
errors: undefined,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ export default class PlatformProfileLoader implements IProfileLoader {
|
|||
private configResult: ConfigResult<ConfigYaml>,
|
||||
private readonly ownerSlug: string,
|
||||
private readonly packageSlug: string,
|
||||
versionSlug: string,
|
||||
private readonly controlPlaneClient: ControlPlaneClient,
|
||||
private readonly ide: IDE,
|
||||
private ideSettingsPromise: Promise<IdeSettings>,
|
||||
|
|
@ -37,7 +38,13 @@ export default class PlatformProfileLoader implements IProfileLoader {
|
|||
) {
|
||||
this.description = {
|
||||
id: `${ownerSlug}/${packageSlug}`,
|
||||
title: `${ownerSlug}/${packageSlug}`,
|
||||
profileType: "platform",
|
||||
fullSlug: {
|
||||
ownerSlug,
|
||||
packageSlug,
|
||||
versionSlug,
|
||||
},
|
||||
title: `${ownerSlug}/${packageSlug}@${versionSlug}`,
|
||||
errors: configResult.errors,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ function AssistantAndModelSelect() {
|
|||
aria-hidden="true"
|
||||
/>
|
||||
<span className="truncate">
|
||||
{selectedProfile?.title || "Select assistant"}
|
||||
{selectedProfile?.fullSlug.packageSlug || "Select assistant"}
|
||||
{" / "}
|
||||
{modelSelectTitle(defaultModel) || "Select model"}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue