From e027ca15c15564ad11961a6d7991aa71f2c32431 Mon Sep 17 00:00:00 2001 From: FranciZhong Date: Fri, 11 Oct 2024 14:57:34 +1100 Subject: [PATCH] fix: pr trigger workflows twice --- .github/workflows/cd.yml | 3 --- .github/workflows/db-migrate.yml | 6 ------ src/components/SelectModelButton.tsx | 2 +- src/lib/utils.ts | 4 ++-- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9fcc6d2..8c91b58 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -4,9 +4,6 @@ on: push: branches: - 'main' - pull_request: - branches: - - 'main' env: PROJECT_ID: ${{ secrets.PROJECT_ID }} diff --git a/.github/workflows/db-migrate.yml b/.github/workflows/db-migrate.yml index 29f3a4e..4c72729 100644 --- a/.github/workflows/db-migrate.yml +++ b/.github/workflows/db-migrate.yml @@ -1,12 +1,6 @@ name: Prisma DB Migrate on: push: - paths: - - prisma/migrations/** # Only run this workflow when migrations are updated - branches: - - deploy-workflow - - pull_request: paths: - prisma/migrations/** # Only run this workflow when migrations are updated branches: diff --git a/src/components/SelectModelButton.tsx b/src/components/SelectModelButton.tsx index 4ec09d0..e5b1a37 100644 --- a/src/components/SelectModelButton.tsx +++ b/src/components/SelectModelButton.tsx @@ -67,7 +67,7 @@ const SelectModelButton: React.FC = ({
{`${model.model} (${model.provider})`}
-
+
{selectedModel && selectedModel.provider === model.provider && selectedModel.model === model.model && ( diff --git a/src/lib/utils.ts b/src/lib/utils.ts index c977098..e1683a2 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,7 +1,7 @@ import { AgentPromptZType, LlmMessageZType } from '@/types/llm'; import { type ClassValue, clsx } from 'clsx'; import { twMerge } from 'tailwind-merge'; -import { AvatarSize } from './constants'; +import { AvatarSize, LlmRole } from './constants'; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); @@ -25,7 +25,7 @@ export const getAvatarSizeStyle = (size: AvatarSize) => { export const convertPrompt2LlmMessage = ( prompt: AgentPromptZType ): LlmMessageZType => ({ - role: 'system', + role: LlmRole.SYSTEM, content: prompt.content, });