(input: {
isCompaction?: boolean;
goalKind?: GoalSyntheticMessageKind;
agentInitiated?: boolean;
})
| 182 | } |
| 183 | |
| 184 | function getGoalStreamOriginKind(input: { |
| 185 | isCompaction?: boolean; |
| 186 | goalKind?: GoalSyntheticMessageKind; |
| 187 | agentInitiated?: boolean; |
| 188 | }): GoalStreamOriginKind { |
| 189 | if (input.isCompaction === true) return "other"; |
| 190 | if (input.goalKind === GOAL_CONTINUATION_KIND) return "goal_continuation"; |
| 191 | if (input.goalKind === GOAL_BUDGET_LIMIT_KIND) return "goal_budget_limit"; |
| 192 | if (input.agentInitiated === true) return "other"; |
| 193 | return "user"; |
| 194 | } |
| 195 | |
| 196 | function coerceGoalSyntheticMessageKind(value: unknown): GoalSyntheticMessageKind | undefined { |
| 197 | if (value === GOAL_CONTINUATION_KIND || value === GOAL_BUDGET_LIMIT_KIND) { |
no outgoing calls
no test coverage detected