mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
Show Citations by default for all users. (#8570)
This commit is contained in:
committed by
GitHub
parent
6b576dc572
commit
6391c4c0f1
@@ -119,7 +119,7 @@ Settings are organized into categories. All settings should be placed within the
|
||||
|
||||
- **`ui.showCitations`** (boolean):
|
||||
- **Description:** Show citations for generated text in the chat.
|
||||
- **Default:** `false`
|
||||
- **Default:** `true`
|
||||
|
||||
- **`ui.accessibility.disableLoadingPhrases`** (boolean):
|
||||
- **Description:** Disable loading phrases for accessibility.
|
||||
|
||||
@@ -32,8 +32,6 @@ import {
|
||||
ApprovalMode,
|
||||
parseAndFormatApiError,
|
||||
ToolConfirmationOutcome,
|
||||
getCodeAssistServer,
|
||||
UserTierId,
|
||||
promptIdContext,
|
||||
} from '@google/gemini-cli-core';
|
||||
import { type Part, type PartListUnion, FinishReason } from '@google/genai';
|
||||
@@ -73,13 +71,12 @@ enum StreamProcessingStatus {
|
||||
|
||||
const EDIT_TOOL_NAMES = new Set(['replace', 'write_file']);
|
||||
|
||||
function showCitations(settings: LoadedSettings, config: Config): boolean {
|
||||
function showCitations(settings: LoadedSettings): boolean {
|
||||
const enabled = settings?.merged?.ui?.showCitations;
|
||||
if (enabled !== undefined) {
|
||||
return enabled;
|
||||
}
|
||||
const server = getCodeAssistServer(config);
|
||||
return (server && server.userTier !== UserTierId.FREE) ?? false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -537,7 +534,7 @@ export const useGeminiStream = (
|
||||
|
||||
const handleCitationEvent = useCallback(
|
||||
(text: string, userMessageTimestamp: number) => {
|
||||
if (!showCitations(settings, config)) {
|
||||
if (!showCitations(settings)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -547,7 +544,7 @@ export const useGeminiStream = (
|
||||
}
|
||||
addItem({ type: MessageType.INFO, text }, userMessageTimestamp);
|
||||
},
|
||||
[addItem, pendingHistoryItemRef, setPendingHistoryItem, settings, config],
|
||||
[addItem, pendingHistoryItemRef, setPendingHistoryItem, settings],
|
||||
);
|
||||
|
||||
const handleFinishedEvent = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user