-
Notifications
You must be signed in to change notification settings - Fork 2.6k
docs: add comprehensive settings documentation #4130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixes: #4129 Signed-off-by: Eric Wheeler <[email protected]>
| </Select> | ||
| ``` | ||
|
|
||
| For enum/compound data types, additional type-safety steps are needed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enum/compound data type instructions are duplicated (lines 174–250 and 252–349). Consider merging or removing one copy to avoid redundancy.
|
Hey @KJ7LNW, This seems slightly outdated, we recently moved types definitions to it's own package You might have to rewrite some parts of the documentation, I'm not sure how stable the current structure is, so we can wait until things settle down. |
that sounds fine I am not in a hurry for this but I do not want to get lost either |
daniel-lxs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for updating this, I think there are a couple of outdated instructions, although it makes sense considering how fast is Roo Code changing.
| - Ensure all tests pass before submitting changes | ||
|
|
||
| ## For Checkbox Settings | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path here is incorrect. Based on the codebase:
// ❌ Incorrect
import { globalSettingsSchema, globalSettingsRecord } from "schemas/index.ts"
// ✅ Correct
import { globalSettingsSchema } from "@roo-code/types"Also, globalSettingsRecord doesn't exist in the codebase - only globalSettingsSchema is available.
|
|
||
| 2. Add the setting to ExtensionStateContext.tsx: | ||
|
|
||
| - Add the setting to the ExtensionStateContextType interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files don't exist in the repository. The actual built type definitions are located at:
packages/types/dist/index.d.ts
Could you update this section to reference the correct location of the auto-generated types?
|
|
||
| ```typescript | ||
| // In ExtensionMessage.ts | ||
| export type ExtensionState = Pick<GlobalSettings, "displayMode" | "otherSettings"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test example doesn't exist in src/core/webview/__tests__/ClineProvider.test.ts. The file contains tests for various settings, but no test specifically for myCheckboxSetting.
Would it be helpful to either:
- Add this test to demonstrate the pattern, or
- Update the documentation to reference an existing test case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll be adding a setting soon, so I'll validate these for a real use case and re-push 'em.
|
probably not going to get to this, closing. |
This PR adds detailed documentation for adding and managing settings in the application.
Context
This PR adds comprehensive documentation on how to add and manage settings in the application, including:
Implementation
The documentation provides a complete guide for developers to understand the settings system and implement new settings correctly, ensuring proper type safety and persistence.
How to Test
Review the documentation for completeness and accuracy.
Fixes: #4129
Important
Adds comprehensive documentation for adding and managing settings, covering schema definitions, type safety, persistence, and debugging.
docs/settings.mdwith detailed steps for adding and managing settings, including schema definitions, type definitions, and test coverage.globalSettingsSchemaandglobalSettingsRecordinschemas/index.ts.exports/types.ts,exports/roo-code.d.ts,shared/ExtensionMessage.ts, andshared/WebviewMessage.ts.SettingsView.tsxand state management inClineProvider.ts.ClineProvider.test.ts.This description was created by
for 0ece9e7. You can customize this summary. It will automatically update as commits are pushed.