logging edit data is now toggleable
This commit is contained in:
parent
9dc60eeb63
commit
6a71e3d6c5
4 changed files with 36 additions and 6 deletions
|
|
@ -19,6 +19,7 @@ export const sharedConfigSchema = z
|
|||
readResponseTTS: z.boolean(),
|
||||
promptPath: z.string(),
|
||||
useCurrentFileAsContext: z.boolean(),
|
||||
logEditingData: z.boolean(),
|
||||
|
||||
// `ui` in `ContinueConfig`
|
||||
showSessionTabs: z.boolean(),
|
||||
|
|
@ -171,6 +172,9 @@ export function modifyAnyConfigWithSharedConfig<
|
|||
configCopy.experimental.useCurrentFileAsContext =
|
||||
sharedConfig.useCurrentFileAsContext;
|
||||
}
|
||||
if (sharedConfig.logEditingData !== undefined) {
|
||||
configCopy.experimental.logEditingData = sharedConfig.logEditingData;
|
||||
}
|
||||
|
||||
return configCopy;
|
||||
}
|
||||
|
|
|
|||
6
core/index.d.ts
vendored
6
core/index.d.ts
vendored
|
|
@ -1227,6 +1227,7 @@ export interface ContinueUIConfig {
|
|||
codeWrap?: boolean;
|
||||
showSessionTabs?: boolean;
|
||||
autoAcceptEditToolDiffs?: boolean;
|
||||
logEditingData?: boolean;
|
||||
}
|
||||
|
||||
export interface ContextMenuConfig {
|
||||
|
|
@ -1368,6 +1369,11 @@ export interface ExperimentalConfig {
|
|||
* If enabled, will add the current file as context.
|
||||
*/
|
||||
useCurrentFileAsContext?: boolean;
|
||||
|
||||
/**
|
||||
* If enabled, will save data on the user's editing processes
|
||||
*/
|
||||
logEditingData?: boolean;
|
||||
}
|
||||
|
||||
export interface AnalyticsConfig {
|
||||
|
|
|
|||
|
|
@ -291,13 +291,11 @@ export class VsCodeExtension {
|
|||
vscode.workspace.onDidChangeTextDocument(async (event) => {
|
||||
const changes = event.contentChanges;
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (!editor) {
|
||||
return;
|
||||
}
|
||||
const { config } = await this.configHandler.loadConfig();
|
||||
|
||||
if (event.contentChanges.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (!config?.experimental?.logEditingData) return;
|
||||
if (!editor) return;
|
||||
if (event.contentChanges.length === 0) return;
|
||||
|
||||
const activeCursorPos = editor.selection.active;
|
||||
const editActions: RangeInFileWithNextEditInfo[] = changes.map(
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ export function UserSettingsForm() {
|
|||
const showChatScrollbar = config.ui?.showChatScrollbar ?? false;
|
||||
const readResponseTTS = config.experimental?.readResponseTTS ?? false;
|
||||
const autoAcceptEditToolDiffs = config.ui?.autoAcceptEditToolDiffs ?? false;
|
||||
const logEditingData = config.experimental?.logEditingData ?? false;
|
||||
const displayRawMarkdown = config.ui?.displayRawMarkdown ?? false;
|
||||
const disableSessionTitles = config.disableSessionTitles ?? false;
|
||||
const useCurrentFileAsContext =
|
||||
|
|
@ -386,6 +387,27 @@ export function UserSettingsForm() {
|
|||
}
|
||||
text="Add Current File by Default"
|
||||
/>
|
||||
|
||||
<ToggleSwitch
|
||||
isToggled={logEditingData}
|
||||
onToggle={() =>
|
||||
handleUpdate({
|
||||
logEditingData: !logEditingData,
|
||||
})
|
||||
}
|
||||
text="Log Editing Data"
|
||||
showIfToggled={
|
||||
<>
|
||||
<ExclamationTriangleIcon
|
||||
data-tooltip-id={`auto-accept-diffs-warning-tooltip`}
|
||||
className="h-3 w-3 text-yellow-500"
|
||||
/>
|
||||
<ToolTip id={`auto-accept-diffs-warning-tooltip`}>
|
||||
{`Only turn this on if you want to log your editing processes in addition to the normal dev data. Note that this will store a lot of data.`}
|
||||
</ToolTip>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue