Skip to content

Commit

Permalink
fix: build, tool api schema scroll (#191)
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Kadlec <[email protected]>
  • Loading branch information
kapetr authored Jan 22, 2025
1 parent 83f03f2 commit baa2d19
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/api/apps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { client } from '../client';
import { assertSuccessResponse, getRequestHeaders } from '../utils';
import { ChatCompletionCreateBody } from './types';
import { ChatCompletionCreateBody, ChatCompletionResponse } from './types';

export async function createChatCompletion(
organizationId: string,
Expand All @@ -28,7 +28,7 @@ export async function createChatCompletion(
headers: getRequestHeaders(organizationId, projectId),
});
assertSuccessResponse(res);
return res.data;
return res.data as ChatCompletionResponse;
}

export async function modulesToPackages(
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type ApiMetadata = {
};

export type EntityResultWithMetadata<T> = Omit<T, 'uiMetadata'> & {
metadata?: ApiMetadata;
metadata?: ApiMetadata | null;
};

export type EntityWithEncodedMetadata<T> = Omit<T, 'uiMetadata'> & {
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function encodeMetadata<T extends EntityMetadata>(
}

export function decodeMetadata<T extends EntityMetadata>(
metadata?: ApiMetadata,
metadata?: ApiMetadata | null,
): T {
const decoded: EntityMetadata = {};

Expand Down
3 changes: 2 additions & 1 deletion src/modules/tools/manage/UserToolModal.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ $modalOtherContentApproxSize: rem(460px);

.apiSchemaField {
> div {
min-block-size: 16rem;
min-block-size: 18rem;
max-block-size: calc($modalBlockSize - $modalOtherContentApproxSize);
overflow-y: auto;
border-radius: $block-radius;
grid-auto-rows: max-content;

@include breakpoint-down(md) {
max-block-size: 24rem;
Expand Down

0 comments on commit baa2d19

Please sign in to comment.