Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae9fbc0

Browse files
committed
chore(site): fix linter complaints in ChatPage
1 parent630a22c commitae9fbc0

File tree

7 files changed

+142
-117
lines changed

7 files changed

+142
-117
lines changed

‎site/pnpm-lock.yaml

Lines changed: 28 additions & 34 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/pages/ChatPage/ChatLanding.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import TextField from "@mui/material/TextField";
88
import{createChat}from"api/queries/chats";
99
importtype{Chat}from"api/typesGenerated";
1010
import{Margins}from"components/Margins/Margins";
11-
import{useAuthenticated}from"contexts/auth/RequireAuth";
11+
import{useAuthenticated}from"hooks";
1212
import{typeFC,typeFormEvent,useState}from"react";
1313
import{useMutation,useQueryClient}from"react-query";
1414
import{useNavigate}from"react-router-dom";
@@ -35,7 +35,6 @@ export const ChatLanding: FC = () => {
3535
consthandleFormSubmit=(e:FormEvent<HTMLFormElement>)=>{
3636
e.preventDefault();
3737
if(!input.trim())return;
38-
console.log("Form submitted with input:",input);
3938
// Actual submission logic will go elsewhere
4039
setInput("");// Clear input after submit (optional)
4140

‎site/src/pages/ChatPage/ChatLayout.tsx

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import ListItemText from "@mui/material/ListItemText";
88
importPaperfrom"@mui/material/Paper";
99
import{createChat,getChats}from"api/queries/chats";
1010
import{deploymentLanguageModels}from"api/queries/deployment";
11-
import{Chat,typeLanguageModelConfig}from"api/typesGenerated";
11+
importtype{LanguageModelConfig}from"api/typesGenerated";
1212
import{ErrorAlert}from"components/Alert/ErrorAlert";
1313
import{Loader}from"components/Loader/Loader";
14+
import{Margins}from"components/Margins/Margins";
15+
import{useAgenticChat}from"contexts/useAgenticChat";
1416
import{
1517
typeFC,
1618
typePropsWithChildren,
@@ -28,7 +30,6 @@ export interface ChatContext {
2830

2931
setSelectedModel:(model:string)=>void;
3032
}
31-
3233
exportconstuseChatContext=():ChatContext=>{
3334
constcontext=useContext(ChatContext);
3435
if(!context){
@@ -87,6 +88,7 @@ export const ChatProvider: FC<PropsWithChildren> = ({ children }) => {
8788
};
8889

8990
exportconstChatLayout:FC=()=>{
91+
constagenticChat=useAgenticChat();
9092
constqueryClient=useQueryClient();
9193
const{data:chats,isLoading:chatsLoading}=useQuery(getChats());
9294
constcreateChatMutation=useMutation(createChat(queryClient));
@@ -98,7 +100,27 @@ export const ChatLayout: FC = () => {
98100
navigate("/chat");
99101
};
100102

101-
console.log(chats);
103+
if(!agenticChat.enabled){
104+
return(
105+
<Margins>
106+
<div
107+
css={{
108+
display:"flex",
109+
flexDirection:"column",
110+
marginTop:"24px",
111+
alignItems:"center",
112+
paddingBottom:"16px",
113+
}}
114+
>
115+
<h1>Agentic Chat is not enabled</h1>
116+
<p>
117+
Agentic Chat is an experimental feature and is not enabled by
118+
default. Please contact your administrator for more information.
119+
</p>
120+
</div>
121+
</Margins>
122+
);
123+
}
102124

103125
return(
104126
// Outermost container: controls height and prevents page scroll

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp