Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"uuid": "^11.1.0",
"xcode": "3.0.1",
"xml-js": "^1.6.11",
"yaml": "^2.8.2",
"yargs": "^16.2.0",
"zod": "^3.24.2",
"zod-to-json-schema": "^3.24.3"
Expand Down
16 changes: 10 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion src/lib/agent-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '../utils/clack-utils';
import type { PackageDotJson } from '../utils/package-json';
import { analytics } from '../utils/analytics';
import { WIZARD_INTERACTION_EVENT_NAME } from './constants';
import { WIZARD_INTERACTION_EVENT_NAME, Integration } from './constants';
import clack from '../utils/clack';
import {
initializeAgent,
Expand All @@ -31,6 +31,7 @@ import * as semver from 'semver';
import {
addMCPServerToClientsStep,
uploadEnvironmentVariablesStep,
updatePreCommitConfigStep,
} from '../steps';
import { checkAnthropicStatusWithPrompt } from '../utils/anthropic-status';
import { enableDebugLogs } from '../utils/debug';
Expand Down Expand Up @@ -304,6 +305,23 @@ Please report this error to: ${chalk.cyan('wizard@posthog.com')}`;
ci: options.ci,
});

// Update pre-commit config for Python frameworks
const pythonIntegrations = [
Integration.django,
Integration.flask,
Integration.fastapi,
Integration.python,
];

let preCommitUpdated = false;
if (pythonIntegrations.includes(config.metadata.integration)) {
const preCommitResult = await updatePreCommitConfigStep({
installDir: options.installDir,
integration: config.metadata.integration,
});
preCommitUpdated = preCommitResult.updated;
}

// Build outro message
const continueUrl = options.signup
? `${getCloudUrlFromRegion(cloudRegion)}/products?source=wizard`
Expand All @@ -317,6 +335,7 @@ Please report this error to: ${chalk.cyan('wizard@posthog.com')}`;
uploadedEnvVars.length > 0
? `Uploaded environment variables to your hosting provider`
: '',
preCommitUpdated ? `Updated pre-commit config with posthog dependency` : '',
].filter(Boolean);

const nextSteps = [
Expand Down
Loading