@omercnet/paseo-pr-radar 3.2.1-next.462.1 → 3.2.1-next.463.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,7 @@ import {
22
22
  hasActiveAgent,
23
23
  matchesRow,
24
24
  openPullRequestUrl,
25
+ profileAgentConfig,
25
26
  type RadarBucket,
26
27
  type RadarRow,
27
28
  type SortKey,
@@ -163,14 +164,8 @@ export function PrRadar({
163
164
  if (!profile) {
164
165
  throw new Error("Configure an agent profile in Paseo before starting an agent.");
165
166
  }
166
- const provider = profile.model ? `${profile.provider}/${profile.model}` : profile.provider;
167
167
  const agentOptions = {
168
- config: {
169
- provider,
170
- ...(profile.modeId ? { modeId: profile.modeId } : {}),
171
- ...(profile.thinkingOptionId ? { thinkingOptionId: profile.thinkingOptionId } : {}),
172
- ...(profile.featureValues ? { featureValues: profile.featureValues } : {}),
173
- },
168
+ config: profileAgentConfig(profile),
174
169
  title: `PR Radar: ${row.repository}#${row.number ?? "PR"}`,
175
170
  prompt,
176
171
  };
package/client/radar.ts CHANGED
@@ -657,3 +657,32 @@ export function checkSummary(row: RadarRow): string {
657
657
  if (passed < row.checks.length) return `${passed} of ${row.checks.length} checks passed`;
658
658
  return passed === 1 ? "1 check passed" : `${passed} checks passed`;
659
659
  }
660
+
661
+ type AgentProfileLike = {
662
+ provider: string;
663
+ model?: string;
664
+ modeId?: string;
665
+ thinkingOptionId?: string;
666
+ // A host older than 0.16 hands over profiles that keep their options here. Its client sends this
667
+ // field as is, and its daemon reads feature values from nowhere else.
668
+ featureValues?: Record<string, unknown>;
669
+ // Paseo 0.16 profiles store provider options here.
670
+ options?: Record<string, unknown>;
671
+ };
672
+
673
+ // Each field goes out as the profile holds it. The 0.16 SDK merges them on send (an explicit
674
+ // `options` key wins); an older host's client does no merging, so folding them here would move a
675
+ // pre-0.16 profile's values to a field its daemon does not read for features.
676
+ export function profileAgentConfig(profile: AgentProfileLike) {
677
+ return {
678
+ provider: profile.model ? `${profile.provider}/${profile.model}` : profile.provider,
679
+ ...(profile.modeId ? { modeId: profile.modeId } : {}),
680
+ ...(profile.thinkingOptionId ? { thinkingOptionId: profile.thinkingOptionId } : {}),
681
+ ...(profile.options && Object.keys(profile.options).length > 0
682
+ ? { options: profile.options }
683
+ : {}),
684
+ ...(profile.featureValues && Object.keys(profile.featureValues).length > 0
685
+ ? { featureValues: profile.featureValues }
686
+ : {}),
687
+ };
688
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omercnet/paseo-pr-radar",
3
- "version": "3.2.1-next.462.1",
3
+ "version": "3.2.1-next.463.1",
4
4
  "type": "module",
5
5
  "description": "A viewer-aware delivery queue for pull requests linked to Paseo workspaces.",
6
6
  "license": "MIT",