Skip to content

Commit f06629c

Browse files
committed
Fixed wording.
1 parent eb010b4 commit f06629c

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
},
158158
{
159159
"view": "deepcode.views.actions",
160-
"contents": "You are currently running DeepCode in manual mode.\n[Analyze now](command:deepcode.start)\n[Switch to auto-scan mode](command:deepcode.setmode?%5B%22auto%22%5D)",
160+
"contents": "You are currently running DeepCode in manual mode. You are in control, no automated actions from our side.\n[Analyze now](command:deepcode.start)\n[Switch to auto-scan mode](command:deepcode.setmode?%5B%22auto%22%5D)",
161161
"when": "deepcode:mode == 'manual'"
162162
},
163163
{
@@ -167,7 +167,7 @@
167167
},
168168
{
169169
"view": "deepcode.views.actions",
170-
"contents": "You are currently running DeepCode in throttled mode. It scans your code every 30 minutes if it detects changes in your files.\n[Analyze now](command:deepcode.start)\n[Switch to auto-scan mode](command:deepcode.setmode?%5B%22auto%22%5D)",
170+
"contents": "You are currently running DeepCode in a throttled mode - it scans your code every 30 minutes if it detects changes in your files.\n[Analyze now](command:deepcode.start)\n[Switch to auto-scan mode](command:deepcode.setmode?%5B%22auto%22%5D)",
171171
"when": "deepcode:mode == 'throttled'"
172172
},
173173
{

src/deepcode/constants/general.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export const ALLOWED_PAYLOAD_SIZE = 1024 * 1024 * 4; // max payload size of 4MB
55
export const MAX_CONNECTION_RETRIES = 5; // max number of automatic retries before showing an error
66
export const IDE_NAME = "vscode";
77
export const EXECUTION_DEBOUNCE_INTERVAL = 1000; // 1 second
8-
export const EXECUTION_DEBOUNCE_EXTENDED_INTERVAL = 1000 * 10;// * 60 * 30; // 30 minutes
8+
export const EXECUTION_THROTTLING_INTERVAL = 1000 * 10;// * 60 * 30; // 30 minutes
99
export const EXECUTION_PAUSE_INTERVAL = 1000 * 60 * 30; // 30 minutes
1010
export const REFRESH_VIEW_DEBOUNCE_INTERVAL = 200; // 200 milliseconds

src/deepcode/lib/modules/DeepCodeLib.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ import { setContext } from "../../utils/vscodeCommandsUtils";
55
import { DEEPCODE_CONTEXT, DEEPCODE_MODE_CODES } from "../../constants/views";
66
import {
77
EXECUTION_DEBOUNCE_INTERVAL,
8-
EXECUTION_DEBOUNCE_EXTENDED_INTERVAL,
8+
EXECUTION_THROTTLING_INTERVAL,
99
EXECUTION_PAUSE_INTERVAL,
1010
} from "../../constants/general";
1111

1212
export default class DeepCodeLib extends BundlesModule implements DeepCode.DeepCodeLibInterface {
1313
private _mode = DEEPCODE_MODE_CODES.AUTO;
1414
// Platform-independant type definition.
1515
private _unpauseTimeout: ReturnType<typeof setTimeout> | undefined;
16-
private _lastExecution: number | undefined;
16+
private _lastThrottledExecution: number | undefined;
1717

1818
private shouldBeThrottled(): boolean {
1919
if (this._mode !== DEEPCODE_MODE_CODES.THROTTLED) return false;
2020
const now = Date.now();
2121
if (
22-
this._lastExecution === undefined ||
23-
(now - this._lastExecution) >= EXECUTION_DEBOUNCE_EXTENDED_INTERVAL
22+
this._lastThrottledExecution === undefined ||
23+
(now - this._lastThrottledExecution) >= EXECUTION_THROTTLING_INTERVAL
2424
) {
25-
this._lastExecution = now;
25+
this._lastThrottledExecution = now;
2626
return false;
2727
}
2828
return true;

0 commit comments

Comments
 (0)