fix typos in diverse files (#3284)

Co-authored-by: Scott Densmore <scottdensmore@mac.com>
This commit is contained in:
Didier Durand 2025-07-05 17:23:39 +02:00 committed by GitHub
parent 47dc16d243
commit ab96676e36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 16 additions and 16 deletions

View File

@ -122,7 +122,7 @@ To further enhance code cleanliness and promote safe functional programming prac
Using these operators:
- Promotes Immutability: Most array operators return new arrays, leaving the original array untouched. This functional approach helps prevent unintended side effects and makes your code more predictable.
- Improves Readability: Chaining array operators often leads to more concise and expressive code than traditional for loops or imperative logic. The intent of the operation is clear at a glance.
- Improves Readability: Chaining array operators often lead to more concise and expressive code than traditional for loops or imperative logic. The intent of the operation is clear at a glance.
- Facilitates Functional Programming: These operators are cornerstones of functional programming, encouraging the creation of pure functions that take inputs and produce outputs without causing side effects. This paradigm is highly beneficial for writing robust and testable code that pairs well with React.
By consistently applying these principles, we can maintain a codebase that is not only efficient and performant but also a joy to work with, both now and in the future.
@ -151,7 +151,7 @@ Use refs only when necessary: Avoid using useRef unless the task genuinely requi
Prefer composition and small components: Break down UI into small, reusable components rather than writing large monolithic components. The code you generate should promote clarity and reusability by composing components together. Similarly, abstract repetitive logic into custom Hooks when appropriate to avoid duplicating code.
Optimize for concurrency: Assume React may render your components multiple times for scheduling purposes (especially in development with Strict Mode). Write code that remains correct even if the component function runs more than once. For instance, avoid side effects in the component body and use functional state updates (e.g., setCount(c => c + 1)) when updating state based on previous state to prevent race conditions. Always include cleanup functions in effects that subscribe to external resources. Don't write useEffects for "do this when this changes" side-effects. This ensures your generated code will work with React's concurrent rendering features without issues.
Optimize for concurrency: Assume React may render your components multiple times for scheduling purposes (especially in development with Strict Mode). Write code that remains correct even if the component function runs more than once. For instance, avoid side effects in the component body and use functional state updates (e.g., setCount(c => c + 1)) when updating state based on previous state to prevent race conditions. Always include cleanup functions in effects that subscribe to external resources. Don't write useEffects for "do this when this changes" side effects. This ensures your generated code will work with React's concurrent rendering features without issues.
Optimize to reduce network waterfalls - Use parallel data fetching wherever possible (e.g., start multiple requests at once rather than one after another). Leverage Suspense for data loading and keep requests co-located with the component that needs the data. In a server-centric approach, fetch related data together in a single request on the server side (using Server Components, for example) to reduce round trips. Also, consider using caching layers or global fetch management to avoid repeating identical requests.

View File

@ -257,7 +257,7 @@ The CLI automatically loads environment variables from an `.env` file. The loadi
- Example: `export OTLP_GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`.
- **`GOOGLE_CLOUD_LOCATION`**:
- Your Google Cloud Project Location (e.g., us-central1).
- Required for using Vertex AI in non express mode.
- Required for using Vertex AI in non-express mode.
- If using Vertex AI, ensure you have the necessary permissions and set the `GOOGLE_GENAI_USE_VERTEXAI=true` environment variable.
- Example: `export GOOGLE_CLOUD_LOCATION="YOUR_PROJECT_LOCATION"`.
- **`GEMINI_SANDBOX`**:
@ -364,7 +364,7 @@ This example demonstrates how you can provide general project context, specific
- Scope: Provides context relevant to the entire project or a significant portion of it.
3. **Sub-directory Context Files (Contextual/Local):**
- Location: The CLI also scans for the configured context file in subdirectories _below_ the current working directory (respecting common ignore patterns like `node_modules`, `.git`, etc.).
- Scope: Allows for highly specific instructions relevant to a particular component, module, or sub-section of your project.
- Scope: Allows for highly specific instructions relevant to a particular component, module, or subsection of your project.
- **Concatenation & UI Indication:** The contents of all found context files are concatenated (with separators indicating their origin and path) and provided as part of the system prompt to the Gemini model. The CLI footer displays the count of loaded context files, giving you a quick visual cue about the active instructional context.
- **Commands for Memory Management:**
- Use `/memory refresh` to force a re-scan and reload of all context files from all configured locations. This updates the AI's instructional context.

View File

@ -20,7 +20,7 @@ This project follows a structured release process to ensure that all packages ar
## Current Theory
For most all changes, simply patching the minor version is acceptable. We can and should release frequently; the more often we release the easier it is to tell what change broke something. Developeres are encouraged to push a release as described below after their branch merges. I also think I'm open to doing the release publishing steps as a part of an existing PR, though this could have more churn if others are also releasing and version numbers change frequently.
For most all changes, simply patching the minor version is acceptable. We can and should release frequently; the more often we release the easier it is to tell what change broke something. Developers are encouraged to push a release as described below after their branch merges. I also think I'm open to doing the release publishing steps as a part of an existing PR, though this could have more churn if others are also releasing and version numbers change frequently.
## How To Release

View File

@ -1,6 +1,6 @@
# Gemini CLI: Quotas and Pricing
Your Gemini CLI quotas and pricing depends on the type of account you use to authenticate with Google. Additionally, both quotas and pricing may may be calculated differently based on the model version, requests, and tokens used. A summary of model usage is available through the `/stats` command and presented on exit at the end of a session. See [privacy and terms](./tos-privacy.md) for details on Privacy policy and Terms of Service. Note: published prices are list price; additional negotiated commercial discounting may apply.
Your Gemini CLI quotas and pricing depend on the type of account you use to authenticate with Google. Additionally, both quotas and pricing may be calculated differently based on the model version, requests, and tokens used. A summary of model usage is available through the `/stats` command and presented on exit at the end of a session. See [privacy and terms](./tos-privacy.md) for details on Privacy policy and Terms of Service. Note: published prices are list price; additional negotiated commercial discounting may apply.
This article outlines the specific quotas and pricing applicable to the Gemini CLI when using different authentication methods.

View File

@ -122,7 +122,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
const base = query.substring(0, slashIndex + 1);
const command = slashCommands.find((cmd) => cmd.name === commandName);
// Make sure completion isn't the original command when command.completigion hasn't happened yet.
// Make sure completion isn't the original command when command.completion hasn't happened yet.
if (command && command.completion && suggestion !== commandName) {
const newValue = `${base}${commandName} ${suggestion}`;
if (newValue === query) {

View File

@ -15,7 +15,7 @@ export interface CompressionDisplayProps {
}
/*
* Compression messages appear when the /compress command is ran, and show a loading spinner
* Compression messages appear when the /compress command is run, and show a loading spinner
* while compression is in progress, followed up by some compression stats.
*/
export const CompressionMessage: React.FC<CompressionDisplayProps> = ({

View File

@ -118,7 +118,7 @@ describe('<ToolMessage />', () => {
expect(lastFrame()).toContain('x');
});
it('shows paused spiner for Executing status when streamingState is Idle', () => {
it('shows paused spinner for Executing status when streamingState is Idle', () => {
const { lastFrame } = renderWithContext(
<ToolMessage {...baseProps} status={ToolCallStatus.Executing} />,
StreamingState.Idle,
@ -128,7 +128,7 @@ describe('<ToolMessage />', () => {
expect(lastFrame()).not.toContain('✔');
});
it('shows paused spiner for Executing status when streamingState is WaitingForConfirmation', () => {
it('shows paused spinner for Executing status when streamingState is WaitingForConfirmation', () => {
const { lastFrame } = renderWithContext(
<ToolMessage {...baseProps} status={ToolCallStatus.Executing} />,
StreamingState.WaitingForConfirmation,

View File

@ -13,7 +13,7 @@ import { describe, it, expect } from 'vitest';
describe('<MaxSizedBox />', () => {
// Make sure MaxSizedBox logs errors on invalid configurations.
// This is useful for debugging issues with the component.
// It should be set to false in production for perfornance and to avoid
// It should be set to false in production for performance and to avoid
// cluttering the console if there are ignorable issues.
setMaxSizedBoxDebugging(true);

View File

@ -328,7 +328,7 @@ function visitBoxRow(element: React.ReactNode): Row {
if (!hasSeenWrapped) {
row.noWrapSegments.push(segment);
} else {
// put in in the wrapped segment as the row is already stuck in wrapped mode.
// put in the wrapped segment as the row is already stuck in wrapped mode.
row.segments.push(segment);
debugReportError(
'Text elements without wrapping cannot appear after elements with wrapping in the same row.',

View File

@ -177,7 +177,7 @@ export async function ensureCorrectEdit(
return result;
}
} else {
// Unescaping old_string resulted in > 1 occurrences
// Unescaping old_string resulted in > 1 occurrence
const result: CorrectedEditResult = {
params: { ...originalParams },
occurrences, // This will be > 1

View File

@ -138,7 +138,7 @@ export function getDiffCommand(
/**
* Opens a diff tool to compare two files.
* Terminal-based editors by default blocks parent process until the editor exits.
* GUI-based editors requires args such as "--wait" to block parent process.
* GUI-based editors require args such as "--wait" to block parent process.
*/
export async function openDiff(
oldPath: string,

View File

@ -112,7 +112,7 @@ export async function checkNextSpeaker(
};
}
// Things checked out. Lets proceed to potentially making an LLM request.
// Things checked out. Let's proceed to potentially making an LLM request.
const lastMessage = curatedHistory[curatedHistory.length - 1];
if (!lastMessage || lastMessage.role !== 'model') {

View File

@ -66,7 +66,7 @@ const env = {
if (process.env.DEBUG) {
// If this is not set, the debugger will pause on the outer process rather
// than the relauncehd process making it harder to debug.
// than the relaunched process making it harder to debug.
env.GEMINI_CLI_NO_RELAUNCH = 'true';
}
const child = spawn('node', nodeArgs, { stdio: 'inherit', env });