mirror of
https://github.com/samiyev/puaros.git
synced 2025-12-28 07:16:53 +05:00
feat(ipuaro): add commands configuration
- Add CommandsConfigSchema with timeout option - Integrate timeout configuration in RunCommandTool - Add 22 new unit tests (19 schema + 3 integration) - Complete v0.22.0 Extended Configuration milestone
This commit is contained in:
@@ -125,6 +125,13 @@ export const AutocompleteConfigSchema = z.object({
|
||||
maxSuggestions: z.number().int().positive().default(10),
|
||||
})
|
||||
|
||||
/**
|
||||
* Commands configuration schema.
|
||||
*/
|
||||
export const CommandsConfigSchema = z.object({
|
||||
timeout: z.number().int().positive().nullable().default(null),
|
||||
})
|
||||
|
||||
/**
|
||||
* Full configuration schema.
|
||||
*/
|
||||
@@ -140,6 +147,7 @@ export const ConfigSchema = z.object({
|
||||
session: SessionConfigSchema.default({}),
|
||||
context: ContextConfigSchema.default({}),
|
||||
autocomplete: AutocompleteConfigSchema.default({}),
|
||||
commands: CommandsConfigSchema.default({}),
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -157,6 +165,7 @@ export type DisplayConfig = z.infer<typeof DisplayConfigSchema>
|
||||
export type SessionConfig = z.infer<typeof SessionConfigSchema>
|
||||
export type ContextConfig = z.infer<typeof ContextConfigSchema>
|
||||
export type AutocompleteConfig = z.infer<typeof AutocompleteConfigSchema>
|
||||
export type CommandsConfig = z.infer<typeof CommandsConfigSchema>
|
||||
|
||||
/**
|
||||
* Default configuration.
|
||||
|
||||
Reference in New Issue
Block a user