Skip to content

Commit e71706e

Browse files
committed
Merge branch 'release/1.1.2'
2 parents 04cd312 + d83cd9f commit e71706e

File tree

16 files changed

+853
-613
lines changed

16 files changed

+853
-613
lines changed

β€Ž.github/workflows/deploy.ymlβ€Ž

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ jobs:
2323
JWT_SECRET: ${{ secrets.JWT_SECRET }}
2424
JWT_REFRESH_SECRET: ${{ secrets.JWT_REFRESH_SECRET }}
2525
VITE_API_URL: ${{ secrets.VITE_API_URL }}
26-
CLOVASTUDIO_PROMPT: ${{ secrets.CLOVASTUDIO_PROMPT }}
27-
CLOVASTUDIO_API_URL: ${{ secrets.CLOVASTUDIO_API_URL }}
28-
CLOVASTUDIO_API_KEY: ${{ secrets.CLOVASTUDIO_API_KEY }}
29-
CLOVASTUDIO_REQUEST_ID: ${{ secrets.CLOVASTUDIO_REQUEST_ID }}
26+
AI_PROMPT: ${{ secrets.AI_PROMPT }}
27+
AI_API_URL: ${{ secrets.AI_API_URL }}
28+
AI_API_KEY: ${{ secrets.AI_API_KEY }}
3029
run: |
3130
docker-compose up -d --build
3231

β€Ž@noctaCrdt/src/types/Interfaces.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ export type PageIconType =
6262
// ν˜‘μ—… κ΄€λ ¨
6363
| "Team" // νŒ€ λ¬Έμ„œ
6464
| "Shared" // 곡유 λ¬Έμ„œ
65-
| "Feedback"; // ν”Όλ“œλ°±/리뷰
65+
| "Feedback" // ν”Όλ“œλ°±/리뷰
66+
| "AI";
6667

6768
export type TextColorType = Exclude<BackgroundColorType, "transparent">;
6869

β€Žclient/src/apis/ai.tsβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ import { unAuthorizationFetch } from "./axios";
44
// TODO μ‹€νŒ¨ μ‹œ μ˜ˆμ™Έμ²˜λ¦¬
55
export const useCreateAIDocumentMutation = (onSuccess: () => void) => {
66
const fetcher = ({
7+
socketId,
78
clientId,
89
workspaceId,
910
message,
1011
}: {
12+
socketId: string;
1113
clientId: number | null;
1214
workspaceId: string | undefined;
1315
message: string;
14-
}) => unAuthorizationFetch.post("/ai/chat", { clientId, workspaceId, message });
16+
}) => unAuthorizationFetch.post("/ai/chat", { socketId, clientId, workspaceId, message });
1517

1618
return useMutation({
1719
mutationFn: fetcher,

β€Žclient/src/components/Toast/ToastContainer.style.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export const ToastContainerStyle = css({
44
display: "flex",
55
zIndex: "9999",
66
position: "fixed",
7+
top: "6",
78
right: "6",
8-
bottom: "6",
99
gap: "2",
1010
flexDirection: "column-reverse",
1111
});

β€Žclient/src/constants/PageIconButton.config.tsβ€Ž

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ import {
2525
// ν˜‘μ—… κ΄€λ ¨
2626
RiGroupLine, // team: νŒ€ λ¬Έμ„œ
2727
RiDiscussLine, // feedback: ν”Όλ“œλ°±
28-
RiAddFill, // plus: μΆ”κ°€
28+
RiAddFill,
29+
RiRobot2Line, // plus: μΆ”κ°€
2930
} from "react-icons/ri";
3031

3132
export interface IconConfig {
@@ -108,6 +109,11 @@ export const iconComponents: Record<PageIconType | "plus", IconConfig> = {
108109
icon: RiAddFill,
109110
color: "#2B4158",
110111
},
112+
113+
AI: {
114+
icon: RiRobot2Line,
115+
color: "#6a00f4",
116+
},
111117
};
112118

113119
export const iconGroups = [

β€Žclient/src/features/ai/AIModal.tsxβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export const AIModal = ({ onCloseButton }: { onCloseButton: () => void }) => {
1313
const [message, setMessage] = useState("");
1414
const { mutate: createAIDocument, status } = useCreateAIDocumentMutation(onCloseButton);
1515
const isLoading = status === "pending";
16+
const { getSocketId } = useSocketStore();
17+
const socketId = getSocketId() || "";
1618

1719
const { addToast } = useToastStore();
1820
const handleSubmit = () => {
@@ -21,7 +23,7 @@ export const AIModal = ({ onCloseButton }: { onCloseButton: () => void }) => {
2123
return;
2224
}
2325
if (!isLoading) {
24-
createAIDocument({ clientId, workspaceId: workspace?.id, message });
26+
createAIDocument({ socketId, clientId, workspaceId: workspace?.id, message });
2527
}
2628
};
2729

0 commit comments

Comments
Β (0)