发布

  • [OPIK-5698] [FE] fix: include project_name in all quickstart code snippets (#6137)

    frostbyte_neo 发布于 2026-04-14 12:37:13 +00:00

    • [OPIK-5698] [FE] fix: include project_name in all quickstart code snippets
    • Fix getConfigCode()/putConfigInCode() to include OPIK_PROJECT_NAME in
      self-hosted (no API key) path
    • Add project_name to configure() in all 20 integration scripts
    • Thread projectName through IntegrationTemplate, IntegrationDetailsDialog,
      EvaluationExamples, AddExperimentDialog, and AddOptimizationDialog
    • Add SNIPPET_PROJECT_NAME constant to avoid hardcoded strings in TSX
    • V2 experiment/optimization dialogs use actual project name from context

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • fix: add project_name to OTEL and remaining integration scripts

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • feat: use active project name in V2 onboarding snippets

    Add useActiveProjectName hook that resolves the currently selected
    project name, falling back to SNIPPET_PROJECT_NAME. Wire it into
    IntegrationDetailsDialog, EvaluationExamples, and FrameworkIntegrations
    so snippets show the real project name when one is selected.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • feat: dynamically replace project_name placeholder in integration scripts

    Replace hardcoded project names in .py scripts with PROJECT_NAME_PLACEHOLDER,
    resolved at render time using the active project name (V2) or fallback
    SNIPPET_PROJECT_NAME (V1).

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • refactor: centralize PROJECT_NAME_PLACEHOLDER replacement in putConfigInCode

    Move the replaceAll(PROJECT_NAME_PLACEHOLDER, ...) logic from 4 call
    sites into putConfigInCode itself, so callers just pass raw code and
    projectName.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • fix: prettier formatting for import statement

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com


    Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com

    下载附件