From aacece4e044d31104443f1545166502bc5ce8d44 Mon Sep 17 00:00:00 2001 From: axel7083 <42176370+axel7083@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:53:48 +0100 Subject: [PATCH] fix: imports and typing Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com> --- packages/backend/src/{ => managers}/playground.ts | 2 +- packages/backend/src/studio-api-impl.spec.ts | 2 +- packages/backend/src/studio-api-impl.ts | 2 +- packages/backend/src/studio.ts | 4 ++-- packages/frontend/src/pages/ModelPlayground.svelte | 6 +++--- packages/frontend/src/utils/client.ts | 2 +- packages/shared/src/{ => messages}/MessageProxy.spec.ts | 1 - packages/shared/src/{ => messages}/MessageProxy.ts | 8 ++++---- 8 files changed, 13 insertions(+), 14 deletions(-) rename packages/backend/src/{ => managers}/playground.ts (99%) rename packages/shared/src/{ => messages}/MessageProxy.spec.ts (96%) rename packages/shared/src/{ => messages}/MessageProxy.ts (95%) diff --git a/packages/backend/src/playground.ts b/packages/backend/src/managers/playground.ts similarity index 99% rename from packages/backend/src/playground.ts rename to packages/backend/src/managers/playground.ts index 214c9349d..c1ccfbe47 100644 --- a/packages/backend/src/playground.ts +++ b/packages/backend/src/managers/playground.ts @@ -10,7 +10,7 @@ import type { ModelResponse } from '@shared/src/models/IModelResponse'; import path from 'node:path'; import * as http from 'node:http'; -import { getFreePort } from './utils/ports'; +import { getFreePort } from '../utils/ports'; import type { QueryState } from '@shared/src/models/IPlaygroundQueryState'; import { MSG_NEW_PLAYGROUND_QUERIES_STATE } from '@shared/Messages'; diff --git a/packages/backend/src/studio-api-impl.spec.ts b/packages/backend/src/studio-api-impl.spec.ts index ab3423765..029a89c45 100644 --- a/packages/backend/src/studio-api-impl.spec.ts +++ b/packages/backend/src/studio-api-impl.spec.ts @@ -24,7 +24,7 @@ import userContent from './ai-user-test.json'; import type { ApplicationManager } from './managers/applicationManager'; import type { RecipeStatusRegistry } from './registries/RecipeStatusRegistry'; import { StudioApiImpl } from './studio-api-impl'; -import type { PlayGroundManager } from './playground'; +import type { PlayGroundManager } from './managers/playground'; import type { TaskRegistry } from './registries/TaskRegistry'; import * as fs from 'node:fs'; diff --git a/packages/backend/src/studio-api-impl.ts b/packages/backend/src/studio-api-impl.ts index 30f0c5ab6..754a22748 100644 --- a/packages/backend/src/studio-api-impl.ts +++ b/packages/backend/src/studio-api-impl.ts @@ -8,7 +8,7 @@ import type { RecipeStatus } from '@shared/src/models/IRecipeStatus'; import type { ModelInfo } from '@shared/src/models/IModelInfo'; import type { TaskRegistry } from './registries/TaskRegistry'; import type { Task } from '@shared/src/models/ITask'; -import type { PlayGroundManager } from './playground'; +import type { PlayGroundManager } from './managers/playground'; import * as podmanDesktopApi from '@podman-desktop/api'; import type { QueryState } from '@shared/src/models/IPlaygroundQueryState'; import type { Catalog } from '@shared/src/models/ICatalog'; diff --git a/packages/backend/src/studio.ts b/packages/backend/src/studio.ts index 7ec079d86..ce438cff1 100644 --- a/packages/backend/src/studio.ts +++ b/packages/backend/src/studio.ts @@ -18,7 +18,7 @@ import type { ExtensionContext, WebviewOptions, WebviewPanel } from '@podman-desktop/api'; import { Uri, window } from '@podman-desktop/api'; -import { RpcExtension } from '@shared/src/MessageProxy'; +import { RpcExtension } from '@shared/src/messages/MessageProxy'; import { StudioApiImpl } from './studio-api-impl'; import { ApplicationManager } from './managers/applicationManager'; import { GitManager } from './managers/gitManager'; @@ -26,7 +26,7 @@ import { RecipeStatusRegistry } from './registries/RecipeStatusRegistry'; import * as fs from 'node:fs'; import { TaskRegistry } from './registries/TaskRegistry'; -import { PlayGroundManager } from './playground'; +import { PlayGroundManager } from './managers/playground'; export class Studio { readonly #extensionContext: ExtensionContext; diff --git a/packages/frontend/src/pages/ModelPlayground.svelte b/packages/frontend/src/pages/ModelPlayground.svelte index ab4811b62..62907d27d 100644 --- a/packages/frontend/src/pages/ModelPlayground.svelte +++ b/packages/frontend/src/pages/ModelPlayground.svelte @@ -60,7 +60,7 @@ result = undefined; // do not display anything before we get a response from askPlayground // (we can receive a new queryState before the new QueryId) - queryId = -1; + queryId = -1; queryId = await studioClient.askPlayground(model.id, prompt); } @@ -73,8 +73,8 @@ rows="4" class="w-full p-2 outline-none text-sm bg-charcoal-800 rounded-sm text-gray-700 placeholder-gray-700" placeholder="Type your prompt here"> - -