Skip to content

Commit c3e7377

Browse files
author
Nevo David
committed
Merge remote-tracking branch 'origin/main'
2 parents c014061 + b09cd71 commit c3e7377

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

apps/backend/src/api/routes/copilot.controller.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Controller, Get, Post, Req, Res } from '@nestjs/common';
1+
import { Logger, Controller, Get, Post, Req, Res } from '@nestjs/common';
22
import {
33
CopilotRuntime,
44
OpenAIAdapter,
@@ -13,6 +13,11 @@ export class CopilotController {
1313
constructor(private _subscriptionService: SubscriptionService) {}
1414
@Post('/chat')
1515
chat(@Req() req: Request, @Res() res: Response) {
16+
if (process.env.OPENAI_API_KEY === undefined || process.env.OPENAI_API_KEY === '') {
17+
Logger.warn('OpenAI API key not set, chat functionality will not work');
18+
return
19+
}
20+
1621
const copilotRuntimeHandler = copilotRuntimeNestEndpoint({
1722
endpoint: '/copilot/chat',
1823
runtime: new CopilotRuntime(),

apps/frontend/src/components/launches/providers/bluesky/bluesky.provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export default withProvider(null, undefined, undefined, async (posts) => {
66
}
77

88
return true;
9-
});
9+
}, 300);

apps/frontend/src/components/launches/providers/discord/discord.provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export default withProvider(
1717
undefined,
1818
DiscordDto,
1919
undefined,
20-
280
20+
1980
2121
);

libraries/nestjs-libraries/src/integrations/social/bluesky.provider.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from '@gitroom/nestjs-libraries/integrations/social/social.integrations.interface';
77
import { makeId } from '@gitroom/nestjs-libraries/services/make.is';
88
import { SocialAbstract } from '@gitroom/nestjs-libraries/integrations/social.abstract';
9-
import { BskyAgent } from '@atproto/api';
9+
import { BskyAgent, RichText } from '@atproto/api';
1010
import dayjs from 'dayjs';
1111
import { Integration } from '@prisma/client';
1212
import { AuthService } from '@gitroom/helpers/auth/auth.service';
@@ -132,9 +132,16 @@ export class BlueskyProvider extends SocialAbstract implements SocialProvider {
132132
}) || []
133133
);
134134

135+
const rt = new RichText({
136+
text: post.message,
137+
})
138+
139+
await rt.detectFacets(agent)
140+
135141
// @ts-ignore
136142
const { cid, uri, commit } = await agent.post({
137-
text: post.message,
143+
text: rt.text,
144+
facets: rt.facets,
138145
createdAt: new Date().toISOString(),
139146
...(images.length
140147
? {

0 commit comments

Comments
 (0)