chat sessions in project view
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
|
|||||||
import ChatWindow from './components/ChatWindow';
|
import ChatWindow from './components/ChatWindow';
|
||||||
import InfoPanel from './components/InfoPanel';
|
import InfoPanel from './components/InfoPanel';
|
||||||
import Sidebar from './components/Sidebar';
|
import Sidebar from './components/Sidebar';
|
||||||
|
import {v4 as uuidv4} from 'uuid';
|
||||||
|
|
||||||
/*** View Panels*** */
|
/*** View Panels*** */
|
||||||
import AllChatsView from './components/AllChatsView';
|
import AllChatsView from './components/AllChatsView';
|
||||||
@@ -25,6 +26,7 @@ export default function App() {
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
sessions,
|
sessions,
|
||||||
|
setSessions,
|
||||||
activeSession,
|
activeSession,
|
||||||
messages,
|
messages,
|
||||||
loadingHistory,
|
loadingHistory,
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ export default function Sidebar({
|
|||||||
{projects.slice(0, 6).map(project => (
|
{projects.slice(0, 6).map(project => (
|
||||||
<button
|
<button
|
||||||
key={project.id}
|
key={project.id}
|
||||||
onClick={() => {onSelectProject(project); onNavigate('all-projects')}}
|
onClick={() => {onSelectProject(project); onNavigate('project')}}
|
||||||
className="btn-reset text-xs"
|
className="btn-reset text-xs"
|
||||||
style={{
|
style={{
|
||||||
padding: '4px 8px',
|
padding: '4px 8px',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useCallback, useRef } from 'react';
|
import { useState, useCallback, useRef } from 'react';
|
||||||
import { streamMessage } from '../api/orchestration';
|
import { streamMessage, updateSession } from '../api/orchestration';
|
||||||
|
|
||||||
export function useChat({ activeSession, appendMessage, updateLastMessage, refreshSessions }) {
|
export function useChat({ activeSession, appendMessage, updateLastMessage, refreshSessions }) {
|
||||||
const [streaming, setStreaming] = useState(false);
|
const [streaming, setStreaming] = useState(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user