Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add back chat #2441

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions client/src/ui/modules/navigation/LeftNavigationModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { motion } from "framer-motion";
import { Suspense, lazy, memo, useEffect, useMemo } from "react";
import { construction, military, trade, worldStructures } from "../../components/navigation/Config";
import CircleButton from "../../elements/CircleButton";
import { Chat } from "../chat/Chat";

const EntityDetails = lazy(() =>
import("../entity-details/EntityDetails").then((module) => ({ default: module.EntityDetails })),
Expand Down Expand Up @@ -217,10 +218,6 @@ export const LeftNavigationModule = memo(() => {
visible: { x: "0%", transition: { duration: 0.5 } },
};





return (
<div className="flex flex-col">
<div className="flex-grow overflow-hidden">
Expand Down Expand Up @@ -260,11 +257,11 @@ export const LeftNavigationModule = memo(() => {
</motion.div>
</div>
</div>
{/* {!IS_MOBILE && (
{!IS_MOBILE && (
<div className="flex">
<Chat />
</div>
)} */}
)}
Comment on lines +260 to +264
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing required chat dependencies

Several critical chat-related files are missing from the implementation:

  • client/src/ui/modules/chat/constants.ts: Contains essential constants like CHAT_COLORS, GLOBAL_CHANNEL, etc.
  • client/src/ui/modules/chat/types.ts: Contains type definitions used across chat components
  • client/src/ui/modules/chat/utils.ts: Contains utility functions like getMessageKey

These files are referenced in the existing chat components but are not present in the codebase. Without these dependencies, the chat functionality will not work properly.

🔗 Analysis chain

Verify associated chat functionality

Since this PR is reintroducing the chat functionality ("add back chat"), we should verify that all necessary associated changes are included.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other chat-related files and configurations

# Look for chat-related components and utilities
fd -e tsx -e ts "chat|Chat" client/src

# Check for chat-related configurations
fd -e json -e js -e ts "config|settings|constants" client/src | xargs rg -i "chat"

# Look for any remaining commented-out chat code
rg -i "//.*chat|/\*.*chat" client/src

Length of output: 279


Script:

#!/bin/bash
# Let's examine the chat-related files to verify their completeness

# Check the content of Chat.tsx
echo "=== Content of Chat.tsx ==="
cat "client/src/ui/modules/chat/Chat.tsx"

# Check the content of ChatState.tsx
echo -e "\n=== Content of ChatState.tsx ==="
cat "client/src/ui/modules/chat/ChatState.tsx"

# Check the content of ChatTab.tsx
echo -e "\n=== Content of ChatTab.tsx ==="
cat "client/src/ui/modules/chat/ChatTab.tsx"

# Look for chat-related imports across the codebase
echo -e "\n=== Chat-related imports ==="
rg -g '*.{ts,tsx}' "import.*Chat" client/src

Length of output: 22987


Script:

#!/bin/bash
# Let's check for any missing chat-related files and dependencies

# Check for chat constants and types
echo "=== Chat Constants ==="
cat "client/src/ui/modules/chat/constants.ts" 2>/dev/null || echo "Missing constants.ts"

echo -e "\n=== Chat Types ==="
cat "client/src/ui/modules/chat/types.ts" 2>/dev/null || echo "Missing types.ts"

echo -e "\n=== Chat Utils ==="
cat "client/src/ui/modules/chat/utils.ts" 2>/dev/null || echo "Missing utils.ts"

echo -e "\n=== Input Field Component ==="
cat "client/src/ui/modules/chat/InputField.tsx" 2>/dev/null || echo "Missing InputField.tsx"

# Check for Event Stream component since it's used in Chat.tsx
echo -e "\n=== Event Stream Component ==="
cat "client/src/ui/modules/stream/EventStream.tsx" 2>/dev/null || echo "Missing EventStream.tsx"

Length of output: 11730

</div>
);
});
Expand Down
Loading