Skip to content

Commit 3c815d7

Browse files
dnplkndllclaude
andcommitted
fix: formatting (prettier/eslint)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Don Kendall <kendall@donkendall.com>
1 parent b029841 commit 3c815d7

5 files changed

Lines changed: 23 additions & 22 deletions

File tree

plugins/ai-bot/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ export const aiBotAccountEmail = 'huly.ai.bot@hc.engineering'
2525

2626
let _aiBotAccountEmail: string = aiBotAccountEmail
2727

28-
export function getAiBotAccountEmail (): string {
28+
export function getAiBotAccountEmail(): string {
2929
return _aiBotAccountEmail
3030
}
3131

32-
export function setAiBotAccountEmail (email: string): void {
32+
export function setAiBotAccountEmail(email: string): void {
3333
_aiBotAccountEmail = email
3434
}
3535

36-
export function getAiBotEmailSocialKey (): string {
36+
export function getAiBotEmailSocialKey(): string {
3737
return buildSocialIdString({
3838
type: SocialIdType.EMAIL,
3939
value: _aiBotAccountEmail

pods/authProviders/src/utils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,10 @@ export async function handleProviderAuth (
117117
}
118118
return concatLink(branding?.front ?? frontUrl, '/login')
119119
} else {
120-
const baseUrl = state.mobileRedirect != null
121-
? `${state.mobileRedirect}://login/auth`
122-
: concatLink(branding?.front ?? frontUrl, '/login/auth')
120+
const baseUrl =
121+
state.mobileRedirect != null
122+
? `${state.mobileRedirect}://login/auth`
123+
: concatLink(branding?.front ?? frontUrl, '/login/auth')
123124
const origin = baseUrl
124125
const queryObj: any = { token: loginInfo.token }
125126
if (state.autoJoin === true) {

server-plugins/ai-bot-resources/src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import contact from '@hcengineering/contact'
3232

3333
import { createAccountRequest, hasAiEndpoint, sendAIEvents } from './utils'
3434

35-
async function OnUserStatus (txes: TxCUD<UserStatus>[], control: TriggerControl): Promise<Tx[]> {
35+
async function OnUserStatus(txes: TxCUD<UserStatus>[], control: TriggerControl): Promise<Tx[]> {
3636
if (!hasAiEndpoint()) {
3737
return []
3838
}
@@ -76,7 +76,7 @@ async function OnUserStatus (txes: TxCUD<UserStatus>[], control: TriggerControl)
7676
return []
7777
}
7878

79-
async function OnMessageSend (originTxs: TxCreateDoc<ChatMessage>[], control: TriggerControl): Promise<Tx[]> {
79+
async function OnMessageSend(originTxs: TxCreateDoc<ChatMessage>[], control: TriggerControl): Promise<Tx[]> {
8080
if (!hasAiEndpoint()) {
8181
return []
8282
}
@@ -120,7 +120,7 @@ async function OnMessageSend (originTxs: TxCreateDoc<ChatMessage>[], control: Tr
120120
return []
121121
}
122122

123-
function getMessageData (doc: Doc, message: ChatMessage): AIEventRequest {
123+
function getMessageData(doc: Doc, message: ChatMessage): AIEventRequest {
124124
return {
125125
createdOn: message.createdOn ?? message.modifiedOn,
126126
objectId: message.attachedTo,
@@ -134,7 +134,7 @@ function getMessageData (doc: Doc, message: ChatMessage): AIEventRequest {
134134
}
135135
}
136136

137-
function getThreadMessageData (message: ThreadMessage): AIEventRequest {
137+
function getThreadMessageData(message: ThreadMessage): AIEventRequest {
138138
return {
139139
createdOn: message.createdOn ?? message.modifiedOn,
140140
objectId: message.attachedTo,
@@ -148,7 +148,7 @@ function getThreadMessageData (message: ThreadMessage): AIEventRequest {
148148
}
149149
}
150150

151-
async function getMessageDoc (message: ChatMessage, control: TriggerControl): Promise<Doc | undefined> {
151+
async function getMessageDoc(message: ChatMessage, control: TriggerControl): Promise<Doc | undefined> {
152152
if (control.hierarchy.isDerived(message._class, chunter.class.ThreadMessage)) {
153153
const thread = message as ThreadMessage
154154
const _id = thread.objectId
@@ -163,7 +163,7 @@ async function getMessageDoc (message: ChatMessage, control: TriggerControl): Pr
163163
}
164164
}
165165

166-
async function isDirectAvailable (direct: DirectMessage, control: TriggerControl): Promise<boolean> {
166+
async function isDirectAvailable(direct: DirectMessage, control: TriggerControl): Promise<boolean> {
167167
const { members } = direct
168168
const account = await getAccountBySocialKey(control, getAiBotEmailSocialKey())
169169

@@ -178,7 +178,7 @@ async function isDirectAvailable (direct: DirectMessage, control: TriggerControl
178178
return members.length === 2
179179
}
180180

181-
async function onBotDirectMessageSend (control: TriggerControl, message: ChatMessage): Promise<void> {
181+
async function onBotDirectMessageSend(control: TriggerControl, message: ChatMessage): Promise<void> {
182182
const direct = (await getMessageDoc(message, control)) as DirectMessage
183183
if (direct === undefined) {
184184
return

services/ai-bot/pod-ai-bot/src/utils/account.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const GET_WORKSPACE_ATTEMPTS = 3
3838
const WAIT_WORKSPACE_CREATION_STEP = 5 * 1000
3939
const MAX_WAIT_WORKSPACE_CREATION_TIME = 20 * 60 * 1000
4040

41-
async function getWorkspaceInfo (ws: WorkspaceUuid, ctx: MeasureContext): Promise<WorkspaceInfoWithStatus | undefined> {
41+
async function getWorkspaceInfo(ws: WorkspaceUuid, ctx: MeasureContext): Promise<WorkspaceInfoWithStatus | undefined> {
4242
const systemToken = generateToken(systemAccountUuid, ws, { service: 'aibot' })
4343
const accountClient = getAccountClient(systemToken)
4444
return await withRetry(
@@ -48,7 +48,7 @@ async function getWorkspaceInfo (ws: WorkspaceUuid, ctx: MeasureContext): Promis
4848
)()
4949
}
5050

51-
async function waitWorkspaceCreation (
51+
async function waitWorkspaceCreation(
5252
workspace: WorkspaceUuid,
5353
ctx: MeasureContext
5454
): Promise<WorkspaceInfoWithStatus | undefined> {
@@ -78,7 +78,7 @@ async function waitWorkspaceCreation (
7878
}
7979
}
8080

81-
export async function getGlobalPerson (token: string): Promise<GlobalPerson | undefined> {
81+
export async function getGlobalPerson(token: string): Promise<GlobalPerson | undefined> {
8282
try {
8383
const accountClient = getAccountClient(token)
8484
return await accountClient.getPerson()
@@ -88,7 +88,7 @@ export async function getGlobalPerson (token: string): Promise<GlobalPerson | un
8888
}
8989
}
9090

91-
export async function tryAssignToWorkspace (workspace: WorkspaceUuid, ctx: MeasureContext): Promise<boolean> {
91+
export async function tryAssignToWorkspace(workspace: WorkspaceUuid, ctx: MeasureContext): Promise<boolean> {
9292
try {
9393
const systemToken = generateToken(systemAccountUuid, undefined, { service: 'aibot' })
9494
const accountClient = getAccountClient(systemToken)
@@ -120,7 +120,7 @@ export async function tryAssignToWorkspace (workspace: WorkspaceUuid, ctx: Measu
120120
return false
121121
}
122122

123-
async function confirmAccount (uuid: PersonUuid): Promise<void> {
123+
async function confirmAccount(uuid: PersonUuid): Promise<void> {
124124
const token = generateToken(uuid, undefined, { service: 'aibot', confirmEmail: getAiBotAccountEmail() })
125125
const client = getAccountClient(token)
126126
try {
@@ -132,7 +132,7 @@ async function confirmAccount (uuid: PersonUuid): Promise<void> {
132132

133133
let account: AccountUuid | undefined
134134

135-
export async function getAccountUuid (ctx?: MeasureContext): Promise<AccountUuid | undefined> {
135+
export async function getAccountUuid(ctx?: MeasureContext): Promise<AccountUuid | undefined> {
136136
if (account !== undefined) return account
137137

138138
const token = generateToken(systemAccountUuid, undefined, { service: 'aibot', confirmEmail: getAiBotAccountEmail() })

services/ai-bot/pod-ai-bot/src/utils/platform.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import chunter, { DirectMessage } from '@hcengineering/chunter'
1919
import { getAiBotEmailSocialKey } from '@hcengineering/ai-bot'
2020
import notification from '@hcengineering/notification'
2121

22-
export async function connectPlatform (token: string, endpoint: string): Promise<Client> {
22+
export async function connectPlatform(token: string, endpoint: string): Promise<Client> {
2323
return await createClient(endpoint, token)
2424
}
2525

26-
export async function getAccountBySocialKey (client: TxOperations, socialKey: string): Promise<AccountUuid | null> {
26+
export async function getAccountBySocialKey(client: TxOperations, socialKey: string): Promise<AccountUuid | null> {
2727
const socialIdentity = await client.findOne(contact.class.SocialIdentity, { key: socialKey })
2828

2929
if (socialIdentity == null) {
@@ -35,7 +35,7 @@ export async function getAccountBySocialKey (client: TxOperations, socialKey: st
3535
return employee?.personUuid ?? null
3636
}
3737

38-
export async function getDirect (
38+
export async function getDirect(
3939
client: TxOperations,
4040
account: AccountUuid,
4141
aiPerson?: Ref<Person>

0 commit comments

Comments
 (0)