Various spelling improvements (#3497)

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Sandy Tao <sandytao520@icloud.com>
This commit is contained in:
Josh Soref
2025-07-21 17:54:44 -04:00
committed by GitHub
parent 8be5f8038a
commit dc2ac144b7
48 changed files with 91 additions and 91 deletions

View File

@@ -229,14 +229,14 @@ describe('runNonInteractive', () => {
it('should not exit if a tool is not found, and should send error back to model', async () => {
const functionCall: FunctionCall = {
id: 'fcNotFound',
name: 'nonExistentTool',
name: 'nonexistentTool',
args: {},
};
const errorResponsePart: Part = {
functionResponse: {
name: 'nonExistentTool',
name: 'nonexistentTool',
id: 'fcNotFound',
response: { error: 'Tool "nonExistentTool" not found in registry.' },
response: { error: 'Tool "nonexistentTool" not found in registry.' },
},
};
@@ -246,8 +246,8 @@ describe('runNonInteractive', () => {
vi.mocked(mockCoreExecuteToolCall).mockResolvedValue({
callId: 'fcNotFound',
responseParts: [errorResponsePart],
resultDisplay: 'Tool "nonExistentTool" not found in registry.',
error: new Error('Tool "nonExistentTool" not found in registry.'),
resultDisplay: 'Tool "nonexistentTool" not found in registry.',
error: new Error('Tool "nonexistentTool" not found in registry.'),
});
const stream1 = (async function* () {
@@ -278,7 +278,7 @@ describe('runNonInteractive', () => {
);
expect(consoleErrorSpy).toHaveBeenCalledWith(
'Error executing tool nonExistentTool: Tool "nonExistentTool" not found in registry.',
'Error executing tool nonexistentTool: Tool "nonexistentTool" not found in registry.',
);
expect(mockProcessExit).not.toHaveBeenCalled();

View File

@@ -298,7 +298,7 @@ const App = ({ config, settings, startupWarnings = [], version }: AppProps) => {
config.getContentGeneratorConfig().authType ===
AuthType.LOGIN_WITH_GOOGLE
) {
// Use actual user tier if available, otherwise default to FREE tier behavior (safe default)
// Use actual user tier if available; otherwise, default to FREE tier behavior (safe default)
const isPaidTier =
userTier === UserTierId.LEGACY || userTier === UserTierId.STANDARD;

View File

@@ -79,7 +79,7 @@ export const Footer: React.FC<FooterProps> = ({
</Text>
) : process.env.SANDBOX === 'sandbox-exec' ? (
<Text color={Colors.AccentYellow}>
MacOS Seatbelt{' '}
macOS Seatbelt{' '}
<Text color={Colors.Gray}>({process.env.SEATBELT_PROFILE})</Text>
</Text>
) : (

View File

@@ -448,7 +448,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
return;
}
// Fallback to the text buffer's default input handling for all other keys
// Fall back to the text buffer's default input handling for all other keys
buffer.handleInput(key);
},
[

View File

@@ -73,7 +73,7 @@ export function ThemeDialog({
const initialThemeIndex = themeItems.findIndex(
(item) => item.value === selectedThemeName,
);
// If not found, fallback to the first theme
// If not found, fall back to the first theme
const safeInitialThemeIndex = initialThemeIndex >= 0 ? initialThemeIndex : 0;
const scopeItems = [
@@ -185,7 +185,7 @@ export function ThemeDialog({
}
// Don't focus the scope selection if it is hidden due to height constraints.
const currenFocusedSection = !showScopeSelection ? 'theme' : focusedSection;
const currentFocusedSection = !showScopeSelection ? 'theme' : focusedSection;
// Vertical space taken by elements other than the two code blocks in the preview pane.
// Includes "Preview" title, borders, and margin between blocks.
@@ -224,8 +224,8 @@ export function ThemeDialog({
<Box flexDirection="row">
{/* Left Column: Selection */}
<Box flexDirection="column" width="45%" paddingRight={2}>
<Text bold={currenFocusedSection === 'theme'} wrap="truncate">
{currenFocusedSection === 'theme' ? '> ' : ' '}Select Theme{' '}
<Text bold={currentFocusedSection === 'theme'} wrap="truncate">
{currentFocusedSection === 'theme' ? '> ' : ' '}Select Theme{' '}
<Text color={Colors.Gray}>{otherScopeModifiedMessage}</Text>
</Text>
<RadioButtonSelect
@@ -234,25 +234,25 @@ export function ThemeDialog({
initialIndex={safeInitialThemeIndex}
onSelect={handleThemeSelect}
onHighlight={handleThemeHighlight}
isFocused={currenFocusedSection === 'theme'}
isFocused={currentFocusedSection === 'theme'}
maxItemsToShow={8}
showScrollArrows={true}
showNumbers={currenFocusedSection === 'theme'}
showNumbers={currentFocusedSection === 'theme'}
/>
{/* Scope Selection */}
{showScopeSelection && (
<Box marginTop={1} flexDirection="column">
<Text bold={currenFocusedSection === 'scope'} wrap="truncate">
{currenFocusedSection === 'scope' ? '> ' : ' '}Apply To
<Text bold={currentFocusedSection === 'scope'} wrap="truncate">
{currentFocusedSection === 'scope' ? '> ' : ' '}Apply To
</Text>
<RadioButtonSelect
items={scopeItems}
initialIndex={0} // Default to User Settings
onSelect={handleScopeSelect}
onHighlight={handleScopeHighlight}
isFocused={currenFocusedSection === 'scope'}
showNumbers={currenFocusedSection === 'scope'}
isFocused={currentFocusedSection === 'scope'}
showNumbers={currentFocusedSection === 'scope'}
/>
</Box>
)}
@@ -261,7 +261,7 @@ export function ThemeDialog({
{/* Right Column: Preview */}
<Box flexDirection="column" width="55%" paddingLeft={2}>
<Text bold>Preview</Text>
{/* Get the Theme object for the highlighted theme, fallback to default if not found */}
{/* Get the Theme object for the highlighted theme, fall back to default if not found */}
{(() => {
const previewTheme =
themeManager.getTheme(

View File

@@ -146,7 +146,7 @@ function executeShellCommand(
process.kill(-child.pid, 'SIGKILL');
}
} catch (_e) {
// Fallback to killing just the main process if group kill fails.
// Fall back to killing just the main process if group kill fails.
if (!exited) child.kill('SIGKILL');
}
}

View File

@@ -92,7 +92,7 @@ describe('useHistoryManager', () => {
});
});
it('should not change history if updateHistoryItem is called with a non-existent ID', () => {
it('should not change history if updateHistoryItem is called with a nonexistent ID', () => {
const { result } = renderHook(() => useHistory());
const timestamp = Date.now();
const itemData: Omit<HistoryItem, 'id'> = {
@@ -107,7 +107,7 @@ describe('useHistoryManager', () => {
const originalHistory = [...result.current.history]; // Clone before update attempt
act(() => {
result.current.updateItem(99999, { text: 'Should not apply' }); // Non-existent ID
result.current.updateItem(99999, { text: 'Should not apply' }); // Nonexistent ID
});
expect(result.current.history).toEqual(originalHistory);

View File

@@ -67,7 +67,7 @@ describe('useShellHistory', () => {
expect(command).toBe('cmd2');
});
it('should handle a non-existent history file gracefully', async () => {
it('should handle a nonexistent history file gracefully', async () => {
const error = new Error('File not found') as NodeJS.ErrnoException;
error.code = 'ENOENT';
mockedFs.readFile.mockRejectedValue(error);

View File

@@ -341,7 +341,7 @@ describe('useReactToolScheduler', () => {
const schedule = result.current[1];
const request: ToolCallRequestInfo = {
callId: 'call1',
name: 'nonExistentTool',
name: 'nonexistentTool',
args: {},
};
@@ -361,7 +361,7 @@ describe('useReactToolScheduler', () => {
request,
response: expect.objectContaining({
error: expect.objectContaining({
message: 'Tool "nonExistentTool" not found in registry.',
message: 'Tool "nonexistentTool" not found in registry.',
}),
}),
}),

View File

@@ -5,7 +5,7 @@
*/
/**
* Shades of Purple Theme — for Highlightjs.
* Shades of Purple Theme — for Highlight.js.
* @author Ahmad Awais <https://twitter.com/mrahmadawais/>
*/
import { type ColorsTheme, Theme } from './theme.js';

View File

@@ -85,7 +85,7 @@ describe('ThemeManager', () => {
expect(themeManager.getTheme('MyCustomTheme')).toBeDefined();
});
it('should fallback to default theme if active theme is invalid', () => {
it('should fall back to default theme if active theme is invalid', () => {
(themeManager as unknown as { activeTheme: unknown }).activeTheme = {
name: 'NonExistent',
type: 'custom',

View File

@@ -117,7 +117,7 @@ class ThemeManager {
if (process.env.NO_COLOR) {
return NoColorTheme;
}
// Ensure the active theme is always valid (fallback to default if not)
// Ensure the active theme is always valid (fall back to default if not)
if (!this.activeTheme || !this.findThemeByName(this.activeTheme.name)) {
this.activeTheme = DEFAULT_THEME;
}

View File

@@ -151,7 +151,7 @@ export class Theme {
inkTheme[key] = resolvedColor;
}
// If color is not resolvable, it's omitted from the map,
// allowing fallback to the default foreground color.
// this enables falling back to the default foreground color.
}
// We currently only care about the 'color' property for Ink rendering.
// Other properties like background, fontStyle, etc., are ignored.

View File

@@ -50,7 +50,7 @@ function renderHastNode(
}
// Determine the color to pass down: Use this element's specific color
// if found, otherwise, continue passing down the already inherited color.
// if found; otherwise, continue passing down the already inherited color.
const colorToPassDown = elementColor || inheritedColor;
// Recursively render children, passing the determined color down
@@ -70,7 +70,7 @@ function renderHastNode(
// Handle Root Node: Start recursion with initially inherited color
if (node.type === 'root') {
// Check if children array is empty - this happens when lowlight can't detect language fallback to plain text
// Check if children array is empty - this happens when lowlight can't detect language fall back to plain text
if (!node.children || node.children.length === 0) {
return null;
}
@@ -161,7 +161,7 @@ export function colorizeCode(
`[colorizeCode] Error highlighting code for language "${language}":`,
error,
);
// Fallback to plain text with default color on error
// Fall back to plain text with default color on error
// Also display line numbers in fallback
const lines = codeToHighlight.split('\n');
const padWidth = String(lines.length).length; // Calculate padding width based on number of lines

View File

@@ -200,7 +200,7 @@ describe('commandUtils', () => {
expect(mockChild.stdin.end).toHaveBeenCalled();
});
it('should fallback to xsel when xclip fails', async () => {
it('should fall back to xsel when xclip fails', async () => {
const testText = 'Hello, world!';
let callCount = 0;

View File

@@ -29,7 +29,7 @@ This function aims to find an *intelligent* or "safe" index within the provided
* **Single Line Breaks:** If no double newline is found in a suitable range, it will look for a single newline (`\n`).
* Any newline chosen as a split point must also not be inside a code block.
4. **Fallback to `idealMaxLength`:**
4. **Fall back to `idealMaxLength`:**
* If no "safer" split point (respecting code blocks or finding suitable newlines) is identified before or at `idealMaxLength`, and `idealMaxLength` itself is not determined to be an unsafe split point (e.g., inside a code block), the function may return a length larger than `idealMaxLength`, again it CANNOT break markdown formatting. This could happen with very long lines of text without Markdown block structures or newlines.
**In essence, `findSafeSplitPoint` tries to be a good Markdown citizen when forced to divide content, preferring structural boundaries over arbitrary character limits, with a strong emphasis on not corrupting code blocks.**

View File

@@ -99,7 +99,7 @@ async function shouldUseCurrentUserInSandbox(): Promise<boolean> {
}
// docker does not allow container names to contain ':' or '/', so we
// parse those out and make the name a little shorter
// parse those out to shorten the name
function parseImageName(image: string): string {
const [fullName, tag] = image.split(':');
const name = fullName.split('/').at(-1) ?? 'unknown-image';
@@ -187,7 +187,7 @@ export async function start_sandbox(
if (config.command === 'sandbox-exec') {
// disallow BUILD_SANDBOX
if (process.env.BUILD_SANDBOX) {
console.error('ERROR: cannot BUILD_SANDBOX when using MacOS Seatbelt');
console.error('ERROR: cannot BUILD_SANDBOX when using macOS Seatbelt');
process.exit(1);
}
const profile = (process.env.SEATBELT_PROFILE ??= 'permissive-open');
@@ -847,7 +847,7 @@ async function ensureSandboxImageIsPresent(
console.info(`Sandbox image ${image} not found locally.`);
if (image === LOCAL_DEV_SANDBOX_IMAGE_NAME) {
// user needs to build the image themself
// user needs to build the image themselves
return false;
}