Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
80eb37b
chore: merge release v1.54.0 back to main [skip ci]
github-actions[bot] Sep 19, 2025
59f980c
chore: upgrade db package version (#1558)
chasprowebdev Sep 22, 2025
227a0fc
chore(deps): bump lucide-react from 0.534.0 to 0.544.0 (#1543)
dependabot[bot] Sep 22, 2025
3d7ee5f
feat(portal): display policies with PDF format (#1559)
Dhanus3133 Sep 24, 2025
56f019d
feat(app): implement automated tasks (#1550)
github-actions[bot] Sep 24, 2025
ee6cb1c
chore(deps): update @ai-sdk packages and bump prisma binary targets (…
github-actions[bot] Sep 25, 2025
55d7b38
chore: fix md file parsing and botid (#1567)
github-actions[bot] Sep 25, 2025
1ec14a6
chore(app): add PrismaPlugin to webpack configuration for server bundle
github-actions[bot] Sep 25, 2025
59d00a6
chore(app): re-enable .md imports as raw strings in webpack config
github-actions[bot] Sep 25, 2025
a450c26
chore(app): enable importing .md files as raw strings in webpack config
github-actions[bot] Sep 25, 2025
b3af710
feat(secrets): fix secrets
github-actions[bot] Sep 25, 2025
31c050b
[dev] [Marfuen] mariano/timeout (#1572)
github-actions[bot] Sep 25, 2025
0236b98
[dev] [Marfuen] mariano/s3 (#1573)
github-actions[bot] Sep 25, 2025
2aebe83
[dev] [Marfuen] mariano/fix-test-automation (#1574)
github-actions[bot] Sep 25, 2025
5796354
chore(automation): update S3 client usage to shared s3Client import (…
github-actions[bot] Sep 25, 2025
9951991
chore(s3): remove console logs and improve error handling for AWS S3 …
github-actions[bot] Sep 25, 2025
a04341c
chore(deps): update @trycompai/db package version to 1.3.7 (#1578)
github-actions[bot] Sep 26, 2025
f2966f0
[dev] [Marfuen] mariano/small-ui-ux-fixes (#1579)
github-actions[bot] Sep 26, 2025
c483c12
[dev] [Marfuen] mariano/more (#1580)
github-actions[bot] Sep 26, 2025
2aa04ef
[dev] [Marfuen] mariano/more-2 (#1581)
github-actions[bot] Sep 26, 2025
f038059
[dev] [Marfuen] mariano/more-3 (#1583)
github-actions[bot] Sep 30, 2025
27b8022
[dev] [Marfuen] mariano/more-4 (#1584)
github-actions[bot] Sep 30, 2025
8606ed8
[dev] [Marfuen] mariano/more-5 (#1585)
github-actions[bot] Sep 30, 2025
d00284a
[dev] [Marfuen] mariano/more-6 (#1586)
github-actions[bot] Sep 30, 2025
f8d6af4
feat(portal): add gmail signin (#1587)
github-actions[bot] Sep 30, 2025
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
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@nestjs/core": "^11.0.1",
"@nestjs/platform-express": "^11.1.5",
"@nestjs/swagger": "^11.2.0",
"@trycompai/db": "^1.3.4",
"@trycompai/db": "^1.3.7",
"archiver": "^7.0.1",
"axios": "^1.12.2",
"class-transformer": "^0.5.1",
Expand Down
3 changes: 3 additions & 0 deletions apps/api/src/comments/comments.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export class CommentsService {
id: comment.author.user.id,
name: comment.author.user.name,
email: comment.author.user.email,
image: comment.author.user.image,
},
attachments,
createdAt: comment.createdAt,
Expand Down Expand Up @@ -209,6 +210,7 @@ export class CommentsService {
id: member.user.id,
name: member.user.name,
email: member.user.email,
image: member.user.image,
},
attachments: result.attachments,
createdAt: result.comment.createdAt,
Expand Down Expand Up @@ -281,6 +283,7 @@ export class CommentsService {
id: existingComment.author.user.id,
name: existingComment.author.user.name,
email: existingComment.author.user.email,
image: existingComment.author.user.image,
},
attachments,
createdAt: updatedComment.createdAt,
Expand Down
7 changes: 7 additions & 0 deletions apps/api/src/comments/dto/comment-responses.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ export class AuthorResponseDto {
example: 'john.doe@company.com',
})
email: string;

@ApiProperty({
description: 'User profile image URL',
example: 'https://example.com/avatar.jpg',
nullable: true,
})
image: string | null;
}

export class CommentResponseDto {
Expand Down
2 changes: 1 addition & 1 deletion apps/app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ REVALIDATION_SECRET="" # openssl rand -base64 32
NEXT_PUBLIC_PORTAL_URL="http://localhost:3002" # The employee portal uses port 3002 by default

# Recommended
# Store attachemnts in any S3 compatible bucket, we use AWS
# Store attachments in any S3 compatible bucket, we use AWS
APP_AWS_ACCESS_KEY_ID="" # AWS Access Key ID
APP_AWS_SECRET_ACCESS_KEY="" # AWS Secret Access Key
APP_AWS_REGION="" # AWS Region
Expand Down
9 changes: 9 additions & 0 deletions apps/app/instrumentation-client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { initBotId } from 'botid/client/core';

initBotId({
protect: [
{ path: '/api/chat', method: 'POST' },
{ path: '/api/tasks-automations/chat', method: 'POST' },
{ path: '/api/tasks-automations/errors', method: 'POST' },
],
});
4 changes: 4 additions & 0 deletions apps/app/markdown.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.md' {
const content: string
export default content
}
33 changes: 31 additions & 2 deletions apps/app/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,46 @@
import { PrismaPlugin } from '@prisma/nextjs-monorepo-workaround-plugin';
import { withBotId } from 'botid/next/config';
import type { NextConfig } from 'next';
import path from 'path';

import './src/env.mjs';

const isStandalone = process.env.NEXT_OUTPUT_STANDALONE === 'true';

const config: NextConfig = {
// Ensure Turbopack can import .md files as raw strings during dev
turbopack: {
root: path.join(__dirname, '..', '..'),
rules: {
'*.md': {
loaders: ['raw-loader'],
as: '*.js',
},
},
},
webpack: (config, { isServer }) => {
if (isServer) {
// Very important, DO NOT REMOVE, it's needed for Prisma to work in the server bundle
config.plugins = [...config.plugins, new PrismaPlugin()];
}

// Enable importing .md files as raw strings during webpack builds
config.module = config.module || { rules: [] };
config.module.rules = config.module.rules || [];
config.module.rules.push({
test: /\.md$/,
type: 'asset/source',
});

return config;
},
// Use S3 bucket for static assets with app-specific path
assetPrefix:
process.env.NODE_ENV === 'production' && process.env.STATIC_ASSETS_URL
? `${process.env.STATIC_ASSETS_URL}/app`
: '',
reactStrictMode: true,
transpilePackages: ['@trycompai/db'],
transpilePackages: ['@trycompai/db', '@prisma/client'],
images: {
remotePatterns: [
{
Expand Down Expand Up @@ -67,4 +96,4 @@ const config: NextConfig = {
},
};

export default config;
export default withBotId(config);
14 changes: 12 additions & 2 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@ai-sdk/provider": "^2.0.0",
"@ai-sdk/react": "^2.0.0",
"@ai-sdk/rsc": "^1.0.0",
"@aws-sdk/client-lambda": "^3.891.0",
"@aws-sdk/client-s3": "^3.859.0",
"@aws-sdk/client-sts": "^3.808.0",
"@aws-sdk/s3-request-presigner": "^3.859.0",
Expand All @@ -25,6 +26,7 @@
"@dub/embed-react": "^0.0.16",
"@hookform/resolvers": "^5.1.1",
"@mendable/firecrawl-js": "^1.24.0",
"@monaco-editor/react": "^4.7.0",
"@nangohq/frontend": "^0.53.2",
"@next/third-parties": "^15.3.1",
"@number-flow/react": "^0.5.9",
Expand All @@ -46,23 +48,26 @@
"@tiptap/extension-table-row": "^3.4.4",
"@trigger.dev/react-hooks": "4.0.0",
"@trigger.dev/sdk": "4.0.0",
"@trycompai/db": "^1.3.4",
"@trycompai/db": "^1.3.7",
"@trycompai/email": "workspace:*",
"@types/canvas-confetti": "^1.9.0",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/three": "^0.180.0",
"@uploadthing/react": "^7.3.0",
"@upstash/ratelimit": "^2.0.5",
"@vercel/sandbox": "^0.0.21",
"@vercel/sdk": "^1.7.1",
"ai": "^5.0.0",
"axios": "^1.9.0",
"better-auth": "^1.2.8",
"botid": "^1.5.5",
"canvas-confetti": "^1.9.3",
"d3": "^7.9.0",
"dub": "^0.66.1",
"framer-motion": "^12.18.1",
"geist": "^1.3.1",
"jspdf": "^3.0.2",
"lucide-react": "^0.534.0",
"lucide-react": "^0.544.0",
"motion": "^12.9.2",
"next": "^15.4.6",
"next-safe-action": "^8.0.3",
Expand All @@ -79,9 +84,12 @@
"react-hotkeys-hook": "^5.1.0",
"react-intersection-observer": "^9.16.0",
"react-markdown": "10.1.0",
"react-spinners": "^0.17.0",
"react-syntax-highlighter": "^15.6.6",
"react-textarea-autosize": "^8.5.9",
"react-use-draggable-scroll": "^0.4.7",
"react-wrap-balancer": "^1.1.1",
"rehype-raw": "^7.0.0",
"remark-gfm": "^4.0.1",
"remark-parse": "^11.0.0",
"resend": "^4.4.1",
Expand All @@ -91,6 +99,7 @@
"ts-pattern": "^5.7.0",
"use-debounce": "^10.0.4",
"use-long-press": "^3.3.0",
"use-stick-to-bottom": "^1.1.1",
"xml2js": "^0.6.2",
"zaraz-ts": "^1.2.0",
"zod": "^3.25.76",
Expand All @@ -116,6 +125,7 @@
"jsdom": "^26.1.0",
"postcss": "^8.5.4",
"prisma": "^6.13.0",
"raw-loader": "^4.0.2",
"tailwindcss": "^4.1.8",
"typescript": "^5.8.3",
"vite-tsconfig-paths": "^5.1.4",
Expand Down
32 changes: 32 additions & 0 deletions apps/app/public/automation-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/app/public/compailogo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions apps/app/src/ai/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { type GatewayModelId } from '@ai-sdk/gateway';

export enum Models {
AmazonNovaPro = 'amazon/nova-pro',
AnthropicClaude4Sonnet = 'anthropic/claude-4-sonnet',
GoogleGeminiFlash = 'google/gemini-2.5-flash',
MoonshotKimiK2 = 'moonshotai/kimi-k2',
OpenAIGPT5 = 'openai/gpt-5',
OpenAIGPT5Mini = 'openai/gpt-5-mini',
OpenAIGPT4oMini = 'openai/gpt-4o-mini',
XaiGrok3Fast = 'xai/grok-3-fast',
}

export const DEFAULT_MODEL = Models.OpenAIGPT5Mini;

export const SUPPORTED_MODELS: GatewayModelId[] = [
Models.AmazonNovaPro,
Models.AnthropicClaude4Sonnet,
Models.GoogleGeminiFlash,
Models.MoonshotKimiK2,
Models.OpenAIGPT5,
Models.OpenAIGPT5Mini,
Models.OpenAIGPT4oMini,
Models.XaiGrok3Fast,
];
47 changes: 47 additions & 0 deletions apps/app/src/ai/gateway.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { createGatewayProvider } from '@ai-sdk/gateway';
import type { OpenAIResponsesProviderOptions } from '@ai-sdk/openai';
import type { LanguageModelV2 } from '@ai-sdk/provider';
import type { JSONValue } from 'ai';
import { Models } from './constants';

export async function getAvailableModels() {
const gateway = gatewayInstance();
const response = await gateway.getAvailableModels();
return response.models.map((model) => ({ id: model.id, name: model.name }));
}

export interface ModelOptions {
model: LanguageModelV2;
providerOptions?: Record<string, Record<string, JSONValue>>;
headers?: Record<string, string>;
}

export function getModelOptions(
modelId: string,
options?: { reasoningEffort?: 'minimal' | 'low' | 'medium' },
): ModelOptions {
const gateway = gatewayInstance();
if (modelId === Models.OpenAIGPT5 || modelId === Models.OpenAIGPT5Mini) {
return {
model: gateway(modelId),
providerOptions: {
openai: {
include: ['reasoning.encrypted_content'],
reasoningEffort: options?.reasoningEffort ?? 'low',
reasoningSummary: 'auto',
serviceTier: 'priority',
} satisfies OpenAIResponsesProviderOptions,
},
};
}

return {
model: gateway(modelId),
};
}

function gatewayInstance() {
return createGatewayProvider({
baseURL: process.env.AI_GATEWAY_BASE_URL,
});
}
Loading
Loading