@@ -11,6 +11,7 @@ import { RpcResponseHelper, WshClient } from "@/app/store/wshclient";
1111import { RpcApi } from "@/app/store/wshclientapi" ;
1212import { makeFeBlockRouteId } from "@/app/store/wshrouter" ;
1313import { DefaultRouter , TabRpcClient } from "@/app/store/wshrpcutil" ;
14+ import { WorkspaceLayoutModel } from "@/app/workspace/workspace-layout-model" ;
1415import { atoms , createBlock , fetchWaveFile , getApi , globalStore , WOS } from "@/store/global" ;
1516import { BlockService , ObjectService } from "@/store/services" ;
1617import { adaptFromReactOrNativeKeyEvent , checkKeyPressed } from "@/util/keyutil" ;
@@ -705,6 +706,8 @@ const WaveAi = ({ model }: { model: WaveAiModel; blockId: string }) => {
705706 const baseFontSize : number = 14 ;
706707 const msgWidths = { } ;
707708 const locked = useAtomValue ( model . locked ) ;
709+ const aiOpts = useAtomValue ( model . aiOpts ) ;
710+ const isUsingProxy = isBlank ( aiOpts . apitoken ) && isBlank ( aiOpts . baseurl ) ;
708711
709712 // a weird workaround to initialize ansynchronously
710713 useEffect ( ( ) => {
@@ -861,8 +864,27 @@ const WaveAi = ({ model }: { model: WaveAiModel; blockId: string }) => {
861864 }
862865 } , [ locked , handleEnterKeyPressed ] ) ;
863866
867+ const handleOpenAIPanel = useCallback ( ( ) => {
868+ WorkspaceLayoutModel . getInstance ( ) . setAIPanelVisible ( true ) ;
869+ } , [ ] ) ;
870+
864871 return (
865872 < div ref = { waveaiRef } className = "waveai" >
873+ { isUsingProxy && (
874+ < div className = "flex items-start gap-3 px-4 py-2 bg-orange-500/25 border-b border-orange-500/50 text-sm" >
875+ < i className = "fa-sharp fa-solid fa-triangle-exclamation text-orange-300 mt-0.5" > </ i >
876+ < span className = "text-primary/90" >
877+ Wave AI Proxy is deprecated and will be removed. Please use the new{ " " }
878+ < button
879+ onClick = { handleOpenAIPanel }
880+ className = "text-accent hover:text-accent/80 underline cursor-pointer"
881+ >
882+ Wave AI panel
883+ </ button > { " " }
884+ instead (better model, terminal integration, tool support, image uploads).
885+ </ span >
886+ </ div >
887+ ) }
866888 < div className = "waveai-chat" >
867889 < ChatWindow ref = { osRef } chatWindowRef = { chatWindowRef } msgWidths = { msgWidths } model = { model } />
868890 </ div >
0 commit comments