Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(pam): lint and type check fixes

bernie-g3b6f9ff252f9
diff --git a/backend/src/ee/services/pam-resource/pam-resource-service.ts b/backend/src/ee/services/pam-resource/pam-resource-service.ts
index 91df1c4f21..346c613eda 100644
--- a/backend/src/ee/services/pam-resource/pam-resource-service.ts
+++ b/backend/src/ee/services/pam-resource/pam-resource-service.ts
@@ -33,7 +33,7 @@ import {
encryptResourceInternalMetadata,
listResourceOptions
} from "./pam-resource-fns";
-import { TCreateResourceDTO, TListResourcesDTO, TSessionSummaryConfigDTO, TUpdateResourceDTO } from "./pam-resource-types";
+import { TCreateResourceDTO, TListResourcesDTO, TUpdateResourceDTO } from "./pam-resource-types";
import { TSSHResourceInternalMetadata } from "./ssh/ssh-resource-types";
import { TWindowsResource } from "./windows-server/windows-server-resource-types";
diff --git a/backend/src/ee/services/pam-session/pam-session-ai-summary-queue.ts b/backend/src/ee/services/pam-session/pam-session-ai-summary-queue.ts
index 82d8fe6277..9900515664 100644
--- a/backend/src/ee/services/pam-session/pam-session-ai-summary-queue.ts
+++ b/backend/src/ee/services/pam-session/pam-session-ai-summary-queue.ts
@@ -1,11 +1,11 @@
import { TPamResourceDALFactory } from "@app/ee/services/pam-resource/pam-resource-dal";
import { PamResource } from "@app/ee/services/pam-resource/pam-resource-enums";
import { logger } from "@app/lib/logger";
+import { QueueJobs, QueueName, TQueueServiceFactory } from "@app/queue";
import { TAppConnectionDALFactory } from "@app/services/app-connection/app-connection-dal";
import { decryptAppConnectionCredentials } from "@app/services/app-connection/app-connection-fns";
import { TKmsServiceFactory } from "@app/services/kms/kms-service";
import { KmsDataKey } from "@app/services/kms/kms-types";
-import { QueueJobs, QueueName, TQueueServiceFactory } from "@app/queue";
import { TPamSessionDALFactory } from "./pam-session-dal";
import { TPamSessionEventBatchDALFactory } from "./pam-session-event-batch-dal";
@@ -129,10 +129,7 @@ export const pamSessionAiSummaryServiceFactory = ({
});
summaryConfig = JSON.parse(decryptor({ cipherTextBlob: encryptedConfig }).toString()) as TSessionSummaryConfig;
} catch (err) {
- logger.error(
- { sessionId, err },
- `${QueueName.PamSessionAiSummary}: failed to decrypt sessionSummaryConfig`
- );
+ logger.error({ sessionId, err }, `${QueueName.PamSessionAiSummary}: failed to decrypt sessionSummaryConfig`);
return;
}
@@ -174,7 +171,10 @@ export const pamSessionAiSummaryServiceFactory = ({
// Cap at 500 batches (~500 MB max) to prevent OOM if a session has an abnormal number of batches
const MAX_BATCHES = 500;
let logs;
- const batches = await pamSessionEventBatchDAL.findBySessionIdPaginated(sessionId, { offset: 0, limit: MAX_BATCHES });
+ const batches = await pamSessionEventBatchDAL.findBySessionIdPaginated(sessionId, {
+ offset: 0,
+ limit: MAX_BATCHES
+ });
if (batches.length > 0) {
logs = await decryptBatches(batches, projectId, kmsService);
} else if (session.encryptedLogsBlob) {
diff --git a/backend/src/ee/services/pam-session/pam-session-summary-fns.ts b/backend/src/ee/services/pam-session/pam-session-summary-fns.ts
index 4a800f6707..fe5c5829bc 100644
--- a/backend/src/ee/services/pam-session/pam-session-summary-fns.ts
+++ b/backend/src/ee/services/pam-session/pam-session-summary-fns.ts
@@ -18,14 +18,13 @@ export const formatLogsForSummary = (
return `[${i + 1}] [${ts}]\nQuery: ${log.input.trim()}\nResult: ${log.output.trim()}`;
});
const joined = lines.join("\n\n");
- return joined.length > MAX_LOG_CHARS ? joined.slice(0, MAX_LOG_CHARS) + "\n...(truncated)" : joined;
+ return joined.length > MAX_LOG_CHARS ? `${joined.slice(0, MAX_LOG_CHARS)}\n...(truncated)` : joined;
}
// SSH: extract input events and decode Base64 → printable text
const terminalLogs = logs as TTerminalEvent[];
const inputLines: string[] = [];
- for (const event of terminalLogs) {
- if (event.eventType !== "input") continue;
+ for (const event of terminalLogs.filter((e) => e.eventType === "input")) {
try {
const decoded = Buffer.from(event.data, "base64").toString("utf8");
// Keep only printable ASCII and common whitespace, strip ANSI escape codes
@@ -37,7 +36,7 @@ export const formatLogsForSummary = (
}
}
const combined = inputLines.join("");
- return combined.length > MAX_LOG_CHARS ? combined.slice(0, MAX_LOG_CHARS) + "\n...(truncated)" : combined;
+ return combined.length > MAX_LOG_CHARS ? `${combined.slice(0, MAX_LOG_CHARS)}\n...(truncated)` : combined;
};
const SYSTEM_PROMPTS: Partial<Record<PamResource, string>> = {
@@ -100,7 +99,7 @@ export const generateSessionSummary = async (
model: string,
system: string,
user: string
-): Promise<{ summary: string; warnings: string[] }> => {
+): Promise<{ summary: string; warnings: { text: string; logIndex?: number }[] }> => {
const anthropic = createAnthropic({ apiKey });
const { object } = await generateObject({
@@ -108,7 +107,7 @@ export const generateSessionSummary = async (
schema: SessionSummarySchema,
system,
messages: [{ role: "user", content: user }],
- maxTokens: 1024
+ maxOutputTokens: 1024
});
return object;
diff --git a/backend/src/server/routes/v1/app-connection-routers/anthropic-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/anthropic-connection-router.ts
index 2624b01bcf..61d978f182 100644
--- a/backend/src/server/routes/v1/app-connection-routers/anthropic-connection-router.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/anthropic-connection-router.ts
@@ -1,9 +1,9 @@
-import { AppConnection } from "@app/services/app-connection/app-connection-enums";
import {
CreateAnthropicConnectionSchema,
SanitizedAnthropicConnectionSchema,
UpdateAnthropicConnectionSchema
} from "@app/services/app-connection/anthropic";
+import { AppConnection } from "@app/services/app-connection/app-connection-enums";
import { registerAppConnectionEndpoints } from "./app-connection-endpoints";
diff --git a/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts
index 0be8fe7219..c41970b5c8 100644
--- a/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts
@@ -15,6 +15,10 @@ import {
OnePassConnectionListItemSchema,
SanitizedOnePassConnectionSchema
} from "@app/services/app-connection/1password";
+import {
+ AnthropicConnectionListItemSchema,
+ SanitizedAnthropicConnectionSchema
+} from "@app/services/app-connection/anthropic";
import { Auth0ConnectionListItemSchema, SanitizedAuth0ConnectionSchema } from "@app/services/app-connection/auth0";
import { AwsConnectionListItemSchema, SanitizedAwsConnectionSchema } from "@app/services/app-connection/aws";
import {
@@ -127,10 +131,6 @@ import {
SanitizedOctopusDeployConnectionSchema
} from "@app/services/app-connection/octopus-deploy";
import { OktaConnectionListItemSchema, SanitizedOktaConnectionSchema } from "@app/services/app-connection/okta";
-import {
- AnthropicConnectionListItemSchema,
- SanitizedAnthropicConnectionSchema
-} from "@app/services/app-connection/anthropic";
import {
OpenRouterConnectionListItemSchema,
SanitizedOpenRouterConnectionSchema
diff --git a/backend/src/server/routes/v1/app-connection-routers/index.ts b/backend/src/server/routes/v1/app-connection-routers/index.ts
index edc0aab7c1..0755d814e2 100644
--- a/backend/src/server/routes/v1/app-connection-routers/index.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/index.ts
@@ -3,8 +3,8 @@ import { registerOCIConnectionRouter } from "@app/ee/routes/v1/app-connection-ro
import { registerOracleDBConnectionRouter } from "@app/ee/routes/v1/app-connection-routers/oracledb-connection-router";
import { AppConnection } from "@app/services/app-connection/app-connection-enums";
-import { registerAnthropicConnectionRouter } from "./anthropic-connection-router";
import { registerOnePassConnectionRouter } from "./1password-connection-router";
+import { registerAnthropicConnectionRouter } from "./anthropic-connection-router";
import { registerAuth0ConnectionRouter } from "./auth0-connection-router";
import { registerAwsConnectionRouter } from "./aws-connection-router";
import { registerAzureADCSConnectionRouter } from "./azure-adcs-connection-router";
diff --git a/backend/src/services/app-connection/anthropic/anthropic-connection-schemas.ts b/backend/src/services/app-connection/anthropic/anthropic-connection-schemas.ts
index b268d5c54a..a90b4d119b 100644
--- a/backend/src/services/app-connection/anthropic/anthropic-connection-schemas.ts
+++ b/backend/src/services/app-connection/anthropic/anthropic-connection-schemas.ts
@@ -31,9 +31,7 @@ export const SanitizedAnthropicConnectionSchema = z.discriminatedUnion("method",
export const ValidateAnthropicConnectionCredentialsSchema = z.discriminatedUnion("method", [
z.object({
- method: z
- .literal(AnthropicConnectionMethod.ApiKey)
- .describe(AppConnections.CREATE(AppConnection.Anthropic).method),
+ method: z.literal(AnthropicConnectionMethod.ApiKey).describe(AppConnections.CREATE(AppConnection.Anthropic).method),
credentials: AnthropicConnectionApiKeyCredentialsSchema.describe(
AppConnections.CREATE(AppConnection.Anthropic).credentials
)
diff --git a/backend/src/services/app-connection/app-connection-fns.ts b/backend/src/services/app-connection/app-connection-fns.ts
index 849263f4de..5295ee62c4 100644
--- a/backend/src/services/app-connection/app-connection-fns.ts
+++ b/backend/src/services/app-connection/app-connection-fns.ts
@@ -26,16 +26,16 @@ import { TIdentityUaDALFactory } from "@app/services/identity-ua/identity-ua-dal
import { KmsDataKey } from "@app/services/kms/kms-types";
import { SECRET_SYNC_CONNECTION_MAP } from "@app/services/secret-sync/secret-sync-maps";
-import {
- AnthropicConnectionMethod,
- getAnthropicConnectionListItem,
- validateAnthropicConnectionCredentials
-} from "./anthropic";
import {
getOnePassConnectionListItem,
OnePassConnectionMethod,
validateOnePassConnectionCredentials
} from "./1password";
+import {
+ AnthropicConnectionMethod,
+ getAnthropicConnectionListItem,
+ validateAnthropicConnectionCredentials
+} from "./anthropic";
import { AppConnection, AppConnectionPlanType } from "./app-connection-enums";
import { TAppConnectionServiceFactoryDep } from "./app-connection-service";
import {
diff --git a/backend/src/services/app-connection/app-connection-service.ts b/backend/src/services/app-connection/app-connection-service.ts
index 0074eff566..6aeb3a24b9 100644
--- a/backend/src/services/app-connection/app-connection-service.ts
+++ b/backend/src/services/app-connection/app-connection-service.ts
@@ -41,6 +41,7 @@ import { TProjectDALFactory } from "@app/services/project/project-dal";
import { ValidateOnePassConnectionCredentialsSchema } from "./1password";
import { onePassConnectionService } from "./1password/1password-connection-service";
+import { ValidateAnthropicConnectionCredentialsSchema } from "./anthropic";
import { TAppConnectionDALFactory } from "./app-connection-dal";
import { AppConnection } from "./app-connection-enums";
import { APP_CONNECTION_NAME_MAP } from "./app-connection-maps";
@@ -122,7 +123,6 @@ import { ValidateOctopusDeployConnectionCredentialsSchema } from "./octopus-depl
import { octopusDeployConnectionService } from "./octopus-deploy/octopus-deploy-connection-service";
import { ValidateOktaConnectionCredentialsSchema } from "./okta";
import { oktaConnectionService } from "./okta/okta-connection-service";
-import { ValidateAnthropicConnectionCredentialsSchema } from "./anthropic";
import { ValidateOpenRouterConnectionCredentialsSchema } from "./open-router";
import { ValidatePostgresConnectionCredentialsSchema } from "./postgres";
import { ValidateRailwayConnectionCredentialsSchema } from "./railway";
diff --git a/backend/src/services/app-connection/app-connection-types.ts b/backend/src/services/app-connection/app-connection-types.ts
index 536e4fbd5a..04a2099573 100644
--- a/backend/src/services/app-connection/app-connection-types.ts
+++ b/backend/src/services/app-connection/app-connection-types.ts
@@ -27,6 +27,12 @@ import {
TOnePassConnectionInput,
TValidateOnePassConnectionCredentialsSchema
} from "./1password";
+import {
+ TAnthropicConnection,
+ TAnthropicConnectionConfig,
+ TAnthropicConnectionInput,
+ TValidateAnthropicConnectionCredentialsSchema
+} from "./anthropic";
import { AWSRegion } from "./app-connection-enums";
import {
TAuth0Connection,
@@ -240,12 +246,6 @@ import {
TOktaConnectionInput,
TValidateOktaConnectionCredentialsSchema
} from "./okta";
-import {
- TAnthropicConnection,
- TAnthropicConnectionConfig,
- TAnthropicConnectionInput,
- TValidateAnthropicConnectionCredentialsSchema
-} from "./anthropic";
import {
TOpenRouterConnection,
TOpenRouterConnectionConfig,
diff --git a/frontend/src/helpers/appConnections.ts b/frontend/src/helpers/appConnections.ts
index 5e51329d72..c262252827 100644
--- a/frontend/src/helpers/appConnections.ts
+++ b/frontend/src/helpers/appConnections.ts
@@ -48,6 +48,7 @@ import {
WindmillConnectionMethod,
ZabbixConnectionMethod
} from "@app/hooks/api/appConnections/types";
+import { AnthropicConnectionMethod } from "@app/hooks/api/appConnections/types/anthropic-connection";
import { AzureDNSConnectionMethod } from "@app/hooks/api/appConnections/types/azure-dns-connection";
import { AzureEntraIdConnectionMethod } from "@app/hooks/api/appConnections/types/azure-entra-id-connection";
import { BitbucketConnectionMethod } from "@app/hooks/api/appConnections/types/bitbucket-connection";
@@ -63,7 +64,6 @@ import { NetlifyConnectionMethod } from "@app/hooks/api/appConnections/types/net
import { NetScalerConnectionMethod } from "@app/hooks/api/appConnections/types/netscaler-connection";
import { NorthflankConnectionMethod } from "@app/hooks/api/appConnections/types/northflank-connection";
import { OCIConnectionMethod } from "@app/hooks/api/appConnections/types/oci-connection";
-import { AnthropicConnectionMethod } from "@app/hooks/api/appConnections/types/anthropic-connection";
import { OpenRouterConnectionMethod } from "@app/hooks/api/appConnections/types/open-router-connection";
import { RailwayConnectionMethod } from "@app/hooks/api/appConnections/types/railway-connection";
import { RenderConnectionMethod } from "@app/hooks/api/appConnections/types/render-connection";
diff --git a/frontend/src/hooks/api/appConnections/types/index.ts b/frontend/src/hooks/api/appConnections/types/index.ts
index 6bc479658a..4194265e71 100644
--- a/frontend/src/hooks/api/appConnections/types/index.ts
+++ b/frontend/src/hooks/api/appConnections/types/index.ts
@@ -1,5 +1,6 @@
import { AppConnection } from "../enums";
import { TOnePassConnection } from "./1password-connection";
+import { TAnthropicConnection } from "./anthropic-connection";
import { TAppConnectionOption } from "./app-options";
import { TAuth0Connection } from "./auth0-connection";
import { TAwsConnection } from "./aws-connection";
@@ -40,7 +41,6 @@ import { TNorthflankConnection } from "./northflank-connection";
import { TOCIConnection } from "./oci-connection";
import { TOctopusDeployConnection } from "./octopus-deploy-connection";
import { TOktaConnection } from "./okta-connection";
-import { TAnthropicConnection } from "./anthropic-connection";
import { TOpenRouterConnection } from "./open-router-connection";
import { TOracleDBConnection } from "./oracledb-connection";
import { TPostgresConnection } from "./postgres-connection";
diff --git a/frontend/src/hooks/api/pam/types/index.ts b/frontend/src/hooks/api/pam/types/index.ts
index c03523d56e..70968d91fc 100644
--- a/frontend/src/hooks/api/pam/types/index.ts
+++ b/frontend/src/hooks/api/pam/types/index.ts
@@ -9,6 +9,7 @@ import {
} from "../enums";
import { TActiveDirectoryAccount, TActiveDirectoryResource } from "./active-directory-resource";
import { TAwsIamAccount, TAwsIamResource } from "./aws-iam-resource";
+import { TSessionSummaryConfig } from "./base-resource";
import { TKubernetesAccount, TKubernetesResource } from "./kubernetes-resource";
import { TMongoDBAccount, TMongoDBResource } from "./mongodb-resource";
import { TMsSQLAccount, TMsSQLResource } from "./mssql-resource";
@@ -17,7 +18,6 @@ import { TPostgresAccount, TPostgresResource } from "./postgres-resource";
import { TRedisAccount, TRedisResource } from "./redis-resource";
import { TSSHAccount, TSSHResource } from "./ssh-resource";
import { TWindowsAccount, TWindowsResource } from "./windows-server-resource";
-import { TSessionSummaryConfig } from "./base-resource";
export * from "./active-directory-resource";
export * from "./aws-iam-resource";
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
index 3faab41988..4e0c3cce3c 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
@@ -15,6 +15,7 @@ import { DiscriminativePick } from "@app/types";
import { AppConnectionHeader } from "../AppConnectionHeader";
import { OnePassConnectionForm } from "./1PasswordConnectionForm";
+import { AnthropicConnectionForm } from "./AnthropicConnectionForm";
import { Auth0ConnectionForm } from "./Auth0ConnectionForm";
import { AwsConnectionForm } from "./AwsConnectionForm";
import { AzureADCSConnectionForm } from "./AzureADCSConnectionForm";
@@ -54,7 +55,6 @@ import { NorthflankConnectionForm } from "./NorthflankConnectionForm";
import { OCIConnectionForm } from "./OCIConnectionForm";
import { OctopusDeployConnectionForm } from "./OctopusDeployConnectionForm";
import { OktaConnectionForm } from "./OktaConnectionForm";
-import { AnthropicConnectionForm } from "./AnthropicConnectionForm";
import { OpenRouterConnectionForm } from "./OpenRouterConnectionForm";
import { OracleDBConnectionForm } from "./OracleDBConnectionForm";
import { PostgresConnectionForm } from "./PostgresConnectionForm";
diff --git a/frontend/src/pages/pam/PamResourceByIDPage/components/PamSessionRecordingModal.tsx b/frontend/src/pages/pam/PamResourceByIDPage/components/PamSessionRecordingModal.tsx
index cafed4d036..fa58b1ae7c 100644
--- a/frontend/src/pages/pam/PamResourceByIDPage/components/PamSessionRecordingModal.tsx
+++ b/frontend/src/pages/pam/PamResourceByIDPage/components/PamSessionRecordingModal.tsx
@@ -68,7 +68,13 @@ export const PamSessionRecordingModal = ({ isOpen, onOpenChange, config, onSave
(LLM_APP_CONNECTIONS as readonly string[]).includes(c.app)
);
- const { control, handleSubmit, reset, setValue, formState: { isSubmitting } } = useForm<FormData>({
+ const {
+ control,
+ handleSubmit,
+ reset,
+ setValue,
+ formState: { isSubmitting }
+ } = useForm<FormData>({
resolver: zodResolver(formSchema),
defaultValues: {
aiInsightsEnabled: config?.aiInsightsEnabled ?? false,
@@ -168,6 +174,7 @@ export const PamSessionRecordingModal = ({ isOpen, onOpenChange, config, onSave
<SelectTrigger>
<SelectValue
placeholder={
+ // eslint-disable-next-line no-nested-ternary
isPending
? "Loading connections..."
: llmConnections.length === 0
@@ -231,16 +238,15 @@ export const PamSessionRecordingModal = ({ isOpen, onOpenChange, config, onSave
<Button
variant="neutral"
onClick={handleSubmit(onSubmit)}
- isDisabled={isSubmitting || (aiInsightsEnabled && (llmConnections.length === 0 || !selectedProvider))}
+ isDisabled={
+ isSubmitting ||
+ (aiInsightsEnabled && (llmConnections.length === 0 || !selectedProvider))
+ }
isLoading={isSubmitting}
>
Update Details
</Button>
- <Button
- variant="outline"
- className="mr-auto"
- onClick={() => onOpenChange(false)}
- >
+ <Button variant="outline" className="mr-auto" onClick={() => onOpenChange(false)}>
Cancel
</Button>
{config && (
diff --git a/frontend/src/pages/pam/PamResourceByIDPage/components/index.ts b/frontend/src/pages/pam/PamResourceByIDPage/components/index.ts
index bc0f833d2f..8498e83e14 100644
--- a/frontend/src/pages/pam/PamResourceByIDPage/components/index.ts
+++ b/frontend/src/pages/pam/PamResourceByIDPage/components/index.ts
@@ -5,7 +5,7 @@ export { PamResourceDetailsSection } from "./PamResourceDetailsSection";
export { PamResourceMetadataSection } from "./PamResourceMetadataSection";
export { PamResourceRelatedResourcesSection } from "./PamResourceRelatedResourcesSection";
export { PamResourceRotationPolicySection } from "./PamResourceRotationPolicySection";
-export { PamResourceSessionRecordingSection } from "./PamResourceSessionRecordingSection";
export type { SessionRecordingConfig } from "./PamResourceSessionRecordingSection";
+export { PamResourceSessionRecordingSection } from "./PamResourceSessionRecordingSection";
export { PamRotationPolicyModal } from "./PamRotationPolicyModal";
export { PamSessionRecordingModal } from "./PamSessionRecordingModal";
diff --git a/frontend/src/pages/pam/PamSessionsByIDPage/components/CommandLogView.tsx b/frontend/src/pages/pam/PamSessionsByIDPage/components/CommandLogView.tsx
index 88fea46303..fc19fa796e 100644
--- a/frontend/src/pages/pam/PamSessionsByIDPage/components/CommandLogView.tsx
+++ b/frontend/src/pages/pam/PamSessionsByIDPage/components/CommandLogView.tsx
@@ -25,7 +25,9 @@ export const CommandLogView = ({ logs, scrollToLogIndex }: Props) => {
setSearch("");
setExpandedLogTimestamps(new Set([target.timestamp]));
setTimeout(() => {
- document.getElementById(`log-${scrollToLogIndex}`)?.scrollIntoView({ behavior: "smooth", block: "center" });
+ document
+ .getElementById(`log-${scrollToLogIndex}`)
+ ?.scrollIntoView({ behavior: "smooth", block: "center" });
}, 50);
}, [scrollToLogIndex, logs]);
diff --git a/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionAiInsightsSection.tsx b/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionAiInsightsSection.tsx
index 20d1f29316..b9e2975f58 100644
--- a/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionAiInsightsSection.tsx
+++ b/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionAiInsightsSection.tsx
@@ -1,4 +1,10 @@
-import { AlertTriangleIcon, ClockIcon, CornerDownRightIcon, SparklesIcon, XCircleIcon } from "lucide-react";
+import {
+ AlertTriangleIcon,
+ ClockIcon,
+ CornerDownRightIcon,
+ SparklesIcon,
+ XCircleIcon
+} from "lucide-react";
import { Spinner } from "@app/components/v2";
import { PamSessionStatus, TPamSession } from "@app/hooks/api/pam";
@@ -11,7 +17,8 @@ type Props = {
export const PamSessionAiInsightsSection = ({ session, onWarningClick }: Props) => {
const { aiInsightsStatus, aiInsightsError, aiInsights } = session;
- const isEnded = session.status === PamSessionStatus.Ended || session.status === PamSessionStatus.Terminated;
+ const isEnded =
+ session.status === PamSessionStatus.Ended || session.status === PamSessionStatus.Terminated;
// Only show if:
// 1. Session is ended AND has an aiInsightsStatus, OR
@@ -40,9 +47,7 @@ export const PamSessionAiInsightsSection = ({ session, onWarningClick }: Props)
<XCircleIcon className="size-4 shrink-0" />
<span className="text-sm font-medium">Summarization failed</span>
</div>
- {aiInsightsError && (
- <p className="text-xs text-mineshaft-400">{aiInsightsError}</p>
- )}
+ {aiInsightsError && <p className="text-xs text-mineshaft-400">{aiInsightsError}</p>}
</div>
)}
@@ -54,7 +59,7 @@ export const PamSessionAiInsightsSection = ({ session, onWarningClick }: Props)
<div className="flex flex-col gap-2">
<div className="flex items-center gap-1.5 text-amber-400">
<AlertTriangleIcon className="size-3.5" />
- <span className="text-xs font-semibold uppercase tracking-wide">Warnings</span>
+ <span className="text-xs font-semibold tracking-wide uppercase">Warnings</span>
</div>
<ul className="flex list-disc flex-col gap-1 pl-4">
{aiInsights.warnings.map((warning, i) => (
@@ -93,7 +98,7 @@ export const PamSessionAiInsightsSection = ({ session, onWarningClick }: Props)
</div>
<div className="mt-4 border-t border-mineshaft-600 pt-3">
- <p className="text-center text-xs italic text-mineshaft-400">
+ <p className="text-center text-xs text-mineshaft-400 italic">
Results are produced by a language model and may not be fully accurate.
</p>
</div>
diff --git a/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx b/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx
index 64ad9f8a0f..2be0bfd058 100644
--- a/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx
+++ b/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx
@@ -53,7 +53,9 @@ export const PamSessionLogsSection = ({ session, scrollToLogIndex }: Props) => {
)}
</div>
- {isDatabaseSession && hasLogs && <CommandLogView logs={logs as TPamCommandLog[]} scrollToLogIndex={scrollToLogIndex} />}
+ {isDatabaseSession && hasLogs && (
+ <CommandLogView logs={logs as TPamCommandLog[]} scrollToLogIndex={scrollToLogIndex} />
+ )}
{isSSHSession && hasLogs && <TerminalEventView events={logs as TTerminalEvent[]} />}
{isHttpSession && hasLogs && <HttpEventView events={logs as THttpEvent[]} />}
{isAwsIamSession && (