* ui: kai ui thing ui: fixes for picking existing chat, feedback and retry buttons ui: connect finding, creating threads ui: more ui tuning for chat window, socket manager ui: get/delete chats logic, create testing socket ui: testing ui: use on click query ui: minor fixed for chat display, rebase ui: start kai thing * ui: add logs, add threadid * ui: feedback methods and ui * ui: store, replacing messages and giving feedback * ui: move retry btn to right corner * ui: move kai service out for ease of code splitting * ui: add thread id to socket connection * ui: support state messages * ui: cancel response generation method * ui: fix toast str * ui: add gfm plugin * ui: ensure md table has max sizes to prevent overflow * ui: revert tailwind styles on markdown block layer * ui: export as pdf, copy text contents of a message * ui: try to save text with formatting in secure contexts * ui: fix types * ui: fixup dark mode colors * ui: add duration for msgs * ui: take out custom jwt * ui: removing hardcode... * ui: change endpoints to prod * ui: swap socket path * ui: flip vis toggle * ui: lock file regenerate
73 lines
2.3 KiB
TypeScript
73 lines
2.3 KiB
TypeScript
import React from 'react';
|
|
import withPageTitle from 'HOCs/withPageTitle';
|
|
import SessionsTabOverview from 'Shared/SessionsTabOverview/SessionsTabOverview';
|
|
import FFlagsList from 'Components/FFlags';
|
|
import NewFFlag from 'Components/FFlags/NewFFlag';
|
|
import { Switch, Route } from 'react-router';
|
|
import {
|
|
sessions,
|
|
fflags,
|
|
withSiteId,
|
|
newFFlag,
|
|
fflag,
|
|
fflagRead,
|
|
bookmarks,
|
|
} from 'App/routes';
|
|
import { withRouter, RouteComponentProps, useLocation } from 'react-router-dom';
|
|
import FlagView from 'Components/FFlags/FlagView/FlagView';
|
|
import { observer } from 'mobx-react-lite';
|
|
import { useStore } from '@/mstore';
|
|
import Bookmarks from 'Shared/SessionsTabOverview/components/Bookmarks/Bookmarks';
|
|
import { PANEL_SIZES } from 'App/constants/panelSizes';
|
|
|
|
// @ts-ignore
|
|
interface IProps extends RouteComponentProps {
|
|
match: {
|
|
params: {
|
|
siteId: string;
|
|
fflagId?: string;
|
|
};
|
|
};
|
|
}
|
|
// TODO should move these routes to the Routes file
|
|
function Overview({ match: { params } }: IProps) {
|
|
const { searchStore } = useStore();
|
|
const { siteId, fflagId } = params;
|
|
const location = useLocation();
|
|
const tab = location.pathname.split('/')[2];
|
|
|
|
React.useEffect(() => {
|
|
searchStore.setActiveTab(tab);
|
|
}, [tab]);
|
|
|
|
return (
|
|
<Switch>
|
|
<Route exact strict path={withSiteId(sessions(), siteId)}>
|
|
<div className="mb-5 w-full mx-auto" style={{ maxWidth: PANEL_SIZES.maxWidth }}>
|
|
<SessionsTabOverview />
|
|
</div>
|
|
</Route>
|
|
<Route exact strict path={withSiteId(bookmarks(), siteId)}>
|
|
<div className="mb-5 w-full mx-auto" style={{ maxWidth: PANEL_SIZES.maxWidth }}>
|
|
<Bookmarks />
|
|
</div>
|
|
</Route>
|
|
<Route exact strict path={withSiteId(fflags(), siteId)}>
|
|
<FFlagsList siteId={siteId} />
|
|
</Route>
|
|
<Route exact strict path={withSiteId(newFFlag(), siteId)}>
|
|
<NewFFlag siteId={siteId} />
|
|
</Route>
|
|
<Route exact strict path={withSiteId(fflag(), siteId)}>
|
|
<NewFFlag siteId={siteId} fflagId={fflagId} />
|
|
</Route>
|
|
<Route exact strict path={withSiteId(fflagRead(), siteId)}>
|
|
<FlagView siteId={siteId} fflagId={fflagId!} />
|
|
</Route>
|
|
</Switch>
|
|
);
|
|
}
|
|
|
|
export default withPageTitle('Sessions - OpenReplay')(
|
|
withRouter(observer(Overview)),
|
|
);
|