From 5fec5d5239aae35e33d443ac20b842ecc6a263b0 Mon Sep 17 00:00:00 2001 From: bicochan Date: Mon, 21 Sep 2026 11:33:59 +0900 Subject: [PATCH] =?UTF-8?q?[as]=20feat:=20RAG=20=EC=9D=B8=EB=8D=B1?= =?UTF-8?q?=EC=8B=B1=20=EC=83=81=ED=83=9C=EC=9D=BC=20=EB=95=8C=20=EA=B2=80?= =?UTF-8?q?=ED=86=A0=EC=9E=90=20=EC=A7=80=EC=A0=95=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EB=B6=84=EA=B8=B0=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/as/src/entities/fnrs-cnsltn/index.ts | 1 + .../model/fnrs-cnsltn-interface.ts | 9 ++++++++ .../pages/fnrs-cnsltn/lib/ai-pending-utils.ts | 16 +++++++++++++- .../ui/components/floating-action-buttons.tsx | 22 ++++++++++--------- .../pages/fnrs-cnsltn/ui/fnrs-view-page.tsx | 11 +++++++--- 5 files changed, 45 insertions(+), 14 deletions(-) diff --git a/apps/as/src/entities/fnrs-cnsltn/index.ts b/apps/as/src/entities/fnrs-cnsltn/index.ts index 31bc2f528..176101dbe 100644 --- a/apps/as/src/entities/fnrs-cnsltn/index.ts +++ b/apps/as/src/entities/fnrs-cnsltn/index.ts @@ -40,6 +40,7 @@ export type { FnrsCnsltnSplmntDmndItem, FnrsCnsltnSplmntDmndResponseDto, FnrsSharItem, + RagIndexingInfoDto, } from "./model/fnrs-cnsltn-interface"; export type { EnvoActnReviewReqDto, diff --git a/apps/as/src/entities/fnrs-cnsltn/model/fnrs-cnsltn-interface.ts b/apps/as/src/entities/fnrs-cnsltn/model/fnrs-cnsltn-interface.ts index 8e50d5d79..2165ff49e 100644 --- a/apps/as/src/entities/fnrs-cnsltn/model/fnrs-cnsltn-interface.ts +++ b/apps/as/src/entities/fnrs-cnsltn/model/fnrs-cnsltn-interface.ts @@ -151,6 +151,14 @@ export type FnrsCnsltnSplmntDmndResponseDto = FnrsCnsltnSplmntDmndItem & fnrsCnsltnDocNo?: string; }; +/** 백엔드 RagIndexingInfoDto */ +export interface RagIndexingInfoDto { + isInProgress: boolean; + elapsedSeconds?: number; + estimatedRemainingSeconds?: number; + message?: string; +} + /** 백엔드 FnrsCnsltnMngDetResponseDto */ export type FnrsCnsltnMngDetResponseDto = PbadmsMngDetResponseBase< FnrsCnsltnMngResponseDto, @@ -159,6 +167,7 @@ export type FnrsCnsltnMngDetResponseDto = PbadmsMngDetResponseBase< > & { fnrsSharList?: FnrsSharBizCstTreeDto[]; sharAtchFileList?: AtflMngClientResponseDto[]; + ragIndexingInfo?: RagIndexingInfoDto | null; }; /** 백엔드 FnrsCnsltnApplySaveRequestDto */ diff --git a/apps/as/src/pages/fnrs-cnsltn/lib/ai-pending-utils.ts b/apps/as/src/pages/fnrs-cnsltn/lib/ai-pending-utils.ts index 1ac079216..99b1b29ab 100644 --- a/apps/as/src/pages/fnrs-cnsltn/lib/ai-pending-utils.ts +++ b/apps/as/src/pages/fnrs-cnsltn/lib/ai-pending-utils.ts @@ -1,3 +1,5 @@ +import type { RagIndexingInfoDto } from "@/entities/fnrs-cnsltn"; + const AI_PENDING_STATUS_CODES = ["FV", "AC", "AV"] as const; type AiPendingStatusCode = (typeof AI_PENDING_STATUS_CODES)[number]; @@ -17,5 +19,17 @@ function getAiPendingMessage(prgrsSttsComCd: string): string { return AI_PENDING_MESSAGES[prgrsSttsComCd as AiPendingStatusCode]; } -export { AI_PENDING_STATUS_CODES, getAiPendingMessage, isAiPendingStatus }; +function isRagIndexingInProgress( + prgrsSttsComCd: string, + ragIndexingInfo?: RagIndexingInfoDto | null, +): boolean { + return prgrsSttsComCd === "ER" && ragIndexingInfo?.isInProgress === true; +} + +export { + AI_PENDING_STATUS_CODES, + getAiPendingMessage, + isAiPendingStatus, + isRagIndexingInProgress, +}; export type { AiPendingStatusCode }; diff --git a/apps/as/src/pages/fnrs-cnsltn/ui/components/floating-action-buttons.tsx b/apps/as/src/pages/fnrs-cnsltn/ui/components/floating-action-buttons.tsx index b3d59f79c..f23e4c521 100644 --- a/apps/as/src/pages/fnrs-cnsltn/ui/components/floating-action-buttons.tsx +++ b/apps/as/src/pages/fnrs-cnsltn/ui/components/floating-action-buttons.tsx @@ -41,6 +41,7 @@ import { import { SplmntDmndDialog, type SplmntDmndDialogConfirmPayload } from "@/widgets/pbadms-sprt"; import { Button } from "@common/components"; +import { isRagIndexingInProgress } from "../../lib/ai-pending-utils"; import { FNRS_CNSLTN_VIEW_BUTTON_ACTION, type FnrsCnsltnViewButtonAction, @@ -627,16 +628,17 @@ function FloatingActionButtons({ 파일 보완 요청 )} - {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.dsgntRvwr) && ( - - )} + {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.dsgntRvwr) && + !isRagIndexingInProgress(prgrsSttsComCd, data.ragIndexingInfo) && ( + + )} {shouldShowButton(FNRS_CNSLTN_VIEW_BUTTON_ACTION.actnCmptn) && (