major apps and hooks refactor

This commit is contained in:
2026-02-21 21:24:31 +00:00
parent e275c0fea6
commit 9e9acd9631
125 changed files with 3840 additions and 3285 deletions
@@ -3,7 +3,7 @@ import { useLocation } from 'react-router';
import { Trash2 } from 'lucide-react';
import { usePanelChannel } from 'hooks/usePanelChannel';
import { useChatSessions } from '@/state/useChatSessions';
import { usePi, EmbeddableChat } from 'apps/Chat';
import { usePiChat, EmbeddableChat } from 'officerdev';
export type SelectedSession = {
id: string;
@@ -70,7 +70,7 @@ function SessionChat({ sessionId, model }: SessionChatProps) {
// We need connection status for the DetailBar, so we still call usePi here
// TODO: Consider moving DetailBar into EmbeddableChat or exposing status from it
const chat = usePi(sessionId, model, { replaceUrl: false });
const chat = usePiChat(sessionId, model, { replaceUrl: false });
return (
<div className="flex flex-col h-full">
@@ -99,7 +99,7 @@ function NewChat() {
const [, setSelected] = usePanelChannel<SelectedSession>(CHANNEL, null);
// We need connection status for DetailBar, so call usePi
const chat = usePi();
const chat = usePiChat();
useEffect(() => {
if (chat.sessionId) {
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { MoreVertical, Edit2, Trash2 } from 'lucide-react';
import { useChatGroups } from '@/state/useChatGroups';
import type { GroupEntry } from 'apps/Chat';
import type { GroupEntry } from 'officerdev';
type GroupContextMenuProps = {
group: GroupEntry;
@@ -2,7 +2,7 @@ import { useState } from 'react';
import { MoreVertical, FolderInput, Edit2, Trash2 } from 'lucide-react';
import { useChatGroups } from '@/state/useChatGroups';
import { useChatSessions } from '@/state/useChatSessions';
import type { SessionEntry } from 'apps/Chat';
import type { SessionEntry } from 'officerdev';
type SessionContextMenuProps = {
session: SessionEntry;