Skip to content
Closed
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
7 changes: 7 additions & 0 deletions src/exports/roo-code.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ type ProviderSettings = {
fuzzyMatchThreshold?: number | undefined
modelTemperature?: (number | null) | undefined
rateLimitSeconds?: number | undefined
warningThreshold?:
| {
context?: number | undefined
tokens?: number | undefined
cost?: number | undefined
}
| undefined
modelMaxTokens?: number | undefined
modelMaxThinkingTokens?: number | undefined
apiModelId?: string | undefined
Expand Down
7 changes: 7 additions & 0 deletions src/exports/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ type ProviderSettings = {
fuzzyMatchThreshold?: number | undefined
modelTemperature?: (number | null) | undefined
rateLimitSeconds?: number | undefined
warningThreshold?:
| {
context?: number | undefined
tokens?: number | undefined
cost?: number | undefined
}
| undefined
modelMaxTokens?: number | undefined
modelMaxThinkingTokens?: number | undefined
apiModelId?: string | undefined
Expand Down
10 changes: 10 additions & 0 deletions src/schemas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ type _AssertExperiments = AssertEqual<Equals<ExperimentId, Keys<Experiments>>>
* ProviderSettingsEntry
*/

export const warningThresholdSchema = z.object({
context: z.number().optional(), // Context window warning threshold
tokens: z.number().optional(), // Total tokens warning threshold
cost: z.number().optional(), // Cost warning threshold
})

export type WarningThreshold = z.infer<typeof warningThresholdSchema>

export const providerSettingsEntrySchema = z.object({
id: z.string(),
name: z.string(),
Expand All @@ -353,6 +361,7 @@ const baseProviderSettingsSchema = z.object({
fuzzyMatchThreshold: z.number().optional(),
modelTemperature: z.number().nullish(),
rateLimitSeconds: z.number().optional(),
warningThreshold: warningThresholdSchema.optional(),
// Claude 3.7 Sonnet Thinking
modelMaxTokens: z.number().optional(),
modelMaxThinkingTokens: z.number().optional(),
Expand Down Expand Up @@ -633,6 +642,7 @@ const providerSettingsRecord: ProviderSettingsRecord = {
fuzzyMatchThreshold: undefined,
modelTemperature: undefined,
rateLimitSeconds: undefined,
warningThreshold: undefined,
// Fake AI
fakeAi: undefined,
// X.AI (Grok)
Expand Down
14 changes: 14 additions & 0 deletions src/shared/support-prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,20 @@ Please provide:
NEW_TASK: {
template: `\${userInput}`,
},
SUMMARY_AND_START_NEW_TASK: {
template: `STOP CURRENT TASK AND Provide a concise summary of the current task status and progress then create a new task using new_task tool.
Create a follow-up task that:
- Continues from the current progress point
- Maintains context from previous work
- Clearly defines next objectives
- Links to relevant artifacts and dependencies

Please include:
- Key decisions and outcomes from current task
- Blocking issues or dependencies
- Suggested next steps
- Related @-mentions and code references`,
},
} as const

type SupportPromptType = keyof typeof supportPromptConfigs
Expand Down
Loading