Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Commit

Permalink
Merge pull request #379 from openchatai/major/new-flows-ui
Browse files Browse the repository at this point in the history
The new flows builder
  • Loading branch information
gharbat authored Dec 17, 2023
2 parents a413088 + 041352b commit 1617d95
Show file tree
Hide file tree
Showing 175 changed files with 4,887 additions and 4,858 deletions.
Empty file removed cc
Empty file.
2 changes: 2 additions & 0 deletions dashboard/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

.idea
28 changes: 28 additions & 0 deletions dashboard/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
}
]
}
48 changes: 32 additions & 16 deletions dashboard/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,60 @@
# Start with a base node image
FROM node:18-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
# Install corepack and pnpm
RUN corepack enable
RUN corepack prepare pnpm@8.7.0 --activate
FROM base AS deps

# Add libc6-compat if necessary for your application
RUN apk add --no-cache libc6-compat

WORKDIR /app

COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN pnpm i --frozen-lockfile
# Copy package files
COPY package.json pnpm-lock.yaml* ./

# Install dependencies
# This layer will be cached unless package.json or pnpm-lock.yaml changes
RUN pnpm i --frozen-lockfile

# Builder image
FROM base AS builder

WORKDIR /app

# Copy installed node_modules from deps stage
COPY --from=deps /app/node_modules ./node_modules
COPY . .

ENV NEXT_TELEMETRY_DISABLED 1
# Copy the rest of your application's source code
COPY . .

# RUN yarn build
# Build your application
RUN pnpm run build

# Production image, copy all the files and run next
# Production image
FROM base AS runner
WORKDIR /app

# Set environment variables
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
ENV PORT 8000
ENV HOSTNAME "0.0.0.0"

WORKDIR /app

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public
# Create a non-root user
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs

# Copy the build output and necessary files from builder stage
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

# copy public folder
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
USER nextjs

EXPOSE 8000

ENV PORT 8000
ENV HOSTNAME "0.0.0.0"

CMD ["node", "server.js"]
CMD ["node", "server.js"]
5 changes: 2 additions & 3 deletions dashboard/app/(copilot)/_parts/LogoMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { ChevronRight } from "lucide-react";
import { useSetAtom } from "jotai";
import { Link } from "@/lib/router-events";
import { searchModalAtom } from "@/app/_store/searchModal";
import { useSearchModal } from "@/app/_store/searchModal";

// i'm bad at naming things
export default function LogoMenu() {
const setSearchModal = useSetAtom(searchModalAtom);
const [, setSearchModal] = useSearchModal();
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";
import { ConversationAside } from "./_parts/ConversationAside";
import { ChatScreen } from "./_parts/ChatScreen";

import { ConversationHeader } from "./_parts/ConversationHeader";
Expand All @@ -12,7 +11,6 @@ export default function Conversations() {
<ConversationHeader />
<ChatScreen />
</div>
<ConversationAside />
</div>
</div>
);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

36 changes: 0 additions & 36 deletions dashboard/app/(copilot)/copilot/[copilot_id]/flows/layout.tsx

This file was deleted.

Loading

0 comments on commit 1617d95

Please sign in to comment.