mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-07-07 14:12:40 +08:00
chore: add comments that will be used later
This commit is contained in:
@@ -40,11 +40,14 @@ import { I18nextProvider, useTranslation } from 'react-i18next';
|
|||||||
import i18n from './i18n/config.js';
|
import i18n from './i18n/config.js';
|
||||||
|
|
||||||
|
|
||||||
|
// ! Move to a separate file called AppContent.ts
|
||||||
// Main App component with routing
|
// Main App component with routing
|
||||||
function AppContent() {
|
function AppContent() {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { sessionId } = useParams();
|
const { sessionId } = useParams();
|
||||||
const { t } = useTranslation('common');
|
const { t } = useTranslation('common');
|
||||||
|
const renderCountRef = useRef(0);
|
||||||
|
console.log(`AppContent render count: ${renderCountRef.current++}`);
|
||||||
|
|
||||||
const { updateAvailable, latestVersion, currentVersion, releaseInfo } = useVersionCheck('siteboon', 'claudecodeui');
|
const { updateAvailable, latestVersion, currentVersion, releaseInfo } = useVersionCheck('siteboon', 'claudecodeui');
|
||||||
const [showVersionModal, setShowVersionModal] = useState(false);
|
const [showVersionModal, setShowVersionModal] = useState(false);
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import { CLAUDE_MODELS, CURSOR_MODELS, CODEX_MODELS } from '../../shared/modelCo
|
|||||||
|
|
||||||
import { safeJsonParse } from '../lib/utils.js';
|
import { safeJsonParse } from '../lib/utils.js';
|
||||||
|
|
||||||
|
// ! Move all utility functions to utils/chatUtils.ts
|
||||||
|
|
||||||
// Helper function to decode HTML entities in text
|
// Helper function to decode HTML entities in text
|
||||||
function decodeHtmlEntities(text) {
|
function decodeHtmlEntities(text) {
|
||||||
if (!text) return text;
|
if (!text) return text;
|
||||||
@@ -4879,7 +4881,7 @@ function ChatInterface({ selectedProject, selectedSession, ws, sendMessage, mess
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ! Unused
|
||||||
const handleNewSession = () => {
|
const handleNewSession = () => {
|
||||||
setChatMessages([]);
|
setChatMessages([]);
|
||||||
setInput('');
|
setInput('');
|
||||||
|
|||||||
@@ -960,6 +960,7 @@ function GitPanel({ selectedProject, isMobile, onFileOpen }) {
|
|||||||
{gitStatus.details && (
|
{gitStatus.details && (
|
||||||
<p className="text-sm text-center leading-relaxed mb-6 max-w-md">{gitStatus.details}</p>
|
<p className="text-sm text-center leading-relaxed mb-6 max-w-md">{gitStatus.details}</p>
|
||||||
)}
|
)}
|
||||||
|
{/* // ! This can be a custom component that can be reused for " Tip: Create a new project..." as well */}
|
||||||
<div className="p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg border border-blue-200 dark:border-blue-800 max-w-md">
|
<div className="p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg border border-blue-200 dark:border-blue-800 max-w-md">
|
||||||
<p className="text-sm text-blue-700 dark:text-blue-300 text-center">
|
<p className="text-sm text-blue-700 dark:text-blue-300 text-center">
|
||||||
<strong>Tip:</strong> Run <code className="bg-blue-100 dark:bg-blue-900 px-2 py-1 rounded font-mono text-xs">git init</code> in your project directory to initialize git source control.
|
<strong>Tip:</strong> Run <code className="bg-blue-100 dark:bg-blue-900 px-2 py-1 rounded font-mono text-xs">git init</code> in your project directory to initialize git source control.
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ function MainContent({
|
|||||||
sendMessage,
|
sendMessage,
|
||||||
messages,
|
messages,
|
||||||
isMobile,
|
isMobile,
|
||||||
isPWA,
|
isPWA, // ! Unused
|
||||||
onMenuClick,
|
onMenuClick,
|
||||||
isLoading,
|
isLoading,
|
||||||
onInputFocusChange,
|
onInputFocusChange,
|
||||||
|
|||||||
Reference in New Issue
Block a user