Skip to content

Commit

Permalink
update: ui kit version
Browse files Browse the repository at this point in the history
  • Loading branch information
alebg committed Oct 8, 2024
1 parent f2580e2 commit 9c3ac49
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 27 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@maany_shr/kernel-planckster-sdk-ts": "^1.0.0-alpha",
"@maany_shr/planckster-ui-kit": "^1.0.0-alpha",
"@maany_shr/rage-ui-kit": "^1.0.0-rc.7",
"@maany_shr/rage-ui-kit": "^1.0.0-rc.8",
"@preact/signals-react": "^2.1.0",
"@tanstack/react-query": "^5.25.0",
"@tanstack/react-query-devtools": "^5.51.21",
Expand Down
28 changes: 11 additions & 17 deletions src/app/[rc_id]/conversations/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import signalsContainer from "~/lib/infrastructure/common/signals-container";
import { SIGNAL_FACTORY } from "~/lib/infrastructure/common/signals-ioc-container";
import type { TListConversationsControllerParameters } from "~/lib/infrastructure/server/controller/list-conversations-controller";
import { Suspense } from "react";
import { Header, SiteFooter } from "@maany_shr/rage-ui-kit";

export default async function ListConversationsServerPage({ params }: { params: { rc_id: string } }) {
const researchContextID = parseInt(params.rc_id);
Expand Down Expand Up @@ -37,27 +38,20 @@ export default async function ListConversationsServerPage({ params }: { params:
await controller.execute(controllerParameters);

return (
<div id="page-layout" className="flex flex-col items-center justify-between gap-4 p-4">
<div id="header" className="flex w-full flex-row items-center justify-between">
<div id="title" className="text-2xl font-bold">
Satellite Data Augmentation{" "}
</div>
<div id="menu" className="flex flex-row items-center justify-between gap-4">
<div id="new-conversation" className="flex flex-row items-center justify-between gap-4">
<button id="new-conversation-button" className="rounded bg-blue-500 px-4 py-2 font-bold text-white hover:bg-blue-700">
Home
</button>
</div>
<div id="upload" className="flex flex-row items-center justify-between gap-4">
<button id="upload-button" className="rounded bg-blue-500 px-4 py-2 font-bold text-white hover:bg-blue-700">
Docs
</button>
</div>
</div>
<div className="flex flex-col items-center justify-between gap-4 max-w-screen overflow-x-hidden h-screen overflow-y-auto">

<div className="sticky top-0 left-0 w-full z-10">
<Header/>
</div>

<Suspense fallback={<div>AG GRID SKELETON...</div>}>
<ListConversationsClientPage viewModel={response.value} researchContextID={researchContextID}/>
</Suspense>

<div className="sticky bottom-0 left-0 w-full z-10">
<SiteFooter/>
</div>

</div>
);
}
13 changes: 10 additions & 3 deletions src/app/_components/chat-page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import { ChatPage, type MessageViewModel, type ChatPageViewModel } from "@maany_shr/rage-ui-kit";
import { ChatPage, type MessageViewModel } from "@maany_shr/rage-ui-kit";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { useState } from "react";
import { type Signal } from "~/lib/core/entity/signals";
Expand All @@ -15,7 +15,14 @@ import signalsContainer from "~/lib/infrastructure/common/signals-container";
import { SIGNAL_FACTORY } from "~/lib/infrastructure/common/signals-ioc-container";

export function ChatClientPageSkeleton() {
return <ChatPage messages={[]} onSendMessage={(messsage: string) => {console.log("Loading, please wait...")}} />;
return (
<ChatPage
messages={[]}
onSendMessage={(messsage: string) => {
console.log("Loading, please wait...");
}}
/>
);
}

export function ChatClientPage(props: { listMessagesViewModel: TListMessagesForConversationViewModel; researchContextID: number; conversationID: number }) {
Expand Down Expand Up @@ -120,7 +127,7 @@ export function ChatClientPage(props: { listMessagesViewModel: TListMessagesForC
<ChatPage
messages={listMessagesViewModel.messages.map((message) => {
return {
role: message.id % 2 === 0 ? "agent" : "user", // TODO: fix this after KP has been refactored
role: message.senderType,
content: message.content,
type: "text", // TODO: fix this after KP has been refactored
timestamp: Number(message.timestamp),
Expand Down

0 comments on commit 9c3ac49

Please sign in to comment.