mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-19 18:40:57 -07:00
feat(policy): add --policy flag for user defined policies (#18500)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,18 @@ import type { ExtensionUpdateAction } from '../state/extensions.js';
|
||||
*/
|
||||
export function createNonInteractiveUI(): CommandContext['ui'] {
|
||||
return {
|
||||
addItem: (_item, _timestamp) => 0,
|
||||
addItem: (item, _timestamp) => {
|
||||
if ('text' in item && item.text) {
|
||||
if (item.type === 'error') {
|
||||
process.stderr.write(`Error: ${item.text}\n`);
|
||||
} else if (item.type === 'warning') {
|
||||
process.stderr.write(`Warning: ${item.text}\n`);
|
||||
} else if (item.type === 'info') {
|
||||
process.stdout.write(`${item.text}\n`);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
clear: () => {},
|
||||
setDebugMessage: (_message) => {},
|
||||
loadHistory: (_newHistory) => {},
|
||||
|
||||
Reference in New Issue
Block a user