fix(tui): share config schema fields
This commit is contained in:
@@ -222,8 +222,7 @@ const colorSchema = z.boolean().default(true)
|
|||||||
const truecolorSchema = z.boolean()
|
const truecolorSchema = z.boolean()
|
||||||
const titleSchema = z.string().default('DeepSeek Harness')
|
const titleSchema = z.string().default('DeepSeek Harness')
|
||||||
|
|
||||||
/** Schemastery schema for presentation settings embedded by app bundles. */
|
const tuiConfigSchemaFields = {
|
||||||
export const TuiConfigSchema: z<TuiConfig> = z.object({
|
|
||||||
showReasoning: showReasoningSchema,
|
showReasoning: showReasoningSchema,
|
||||||
maxToolOutputLines: maxToolOutputLinesSchema,
|
maxToolOutputLines: maxToolOutputLinesSchema,
|
||||||
maxQuestionOptions: maxQuestionOptionsSchema,
|
maxQuestionOptions: maxQuestionOptionsSchema,
|
||||||
@@ -239,7 +238,10 @@ export const TuiConfigSchema: z<TuiConfig> = z.object({
|
|||||||
color: colorSchema,
|
color: colorSchema,
|
||||||
truecolor: truecolorSchema,
|
truecolor: truecolorSchema,
|
||||||
title: titleSchema,
|
title: titleSchema,
|
||||||
})
|
}
|
||||||
|
|
||||||
|
/** Schemastery schema for presentation settings embedded by app bundles. */
|
||||||
|
export const TuiConfigSchema: z<TuiConfig> = z.object(tuiConfigSchemaFields)
|
||||||
|
|
||||||
/** Serializable plugin configuration. */
|
/** Serializable plugin configuration. */
|
||||||
export interface Config extends TuiConfig {
|
export interface Config extends TuiConfig {
|
||||||
@@ -261,21 +263,7 @@ export const Config: z<Config> = z.object({
|
|||||||
welcome: z.string(),
|
welcome: z.string(),
|
||||||
sessionId: z.string().default('main'),
|
sessionId: z.string().default('main'),
|
||||||
resumeCommand: z.string(),
|
resumeCommand: z.string(),
|
||||||
showReasoning: showReasoningSchema,
|
...tuiConfigSchemaFields,
|
||||||
maxToolOutputLines: maxToolOutputLinesSchema,
|
|
||||||
maxQuestionOptions: maxQuestionOptionsSchema,
|
|
||||||
maxModelOptions: maxModelOptionsSchema,
|
|
||||||
questionDialogWidth: questionDialogWidthSchema,
|
|
||||||
questionDialogMaxHeight: questionDialogMaxHeightSchema,
|
|
||||||
modelDialogWidth: modelDialogWidthSchema,
|
|
||||||
modelDialogMaxHeight: modelDialogMaxHeightSchema,
|
|
||||||
fileSearchMaxResults: fileSearchMaxResultsSchema,
|
|
||||||
fileSearchMaxEntries: fileSearchMaxEntriesSchema,
|
|
||||||
fileSearchExcludedDirectories: fileSearchExcludedDirectoriesSchema,
|
|
||||||
showHardwareCursor: showHardwareCursorSchema,
|
|
||||||
color: colorSchema,
|
|
||||||
truecolor: truecolorSchema,
|
|
||||||
title: titleSchema,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/** Fully defaulted TUI presentation settings. */
|
/** Fully defaulted TUI presentation settings. */
|
||||||
|
|||||||
Reference in New Issue
Block a user