mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
feat: 优化useSettingsHooks以及全面review DiffRender的settings的入参是否有缺失
This commit is contained in:
parent
1a87ae9dde
commit
a9280d992e
5 changed files with 62 additions and 22 deletions
|
|
@ -30,7 +30,7 @@ import {
|
|||
TOOL_STATUS,
|
||||
} from '../../constants.js';
|
||||
import { theme } from '../../semantic-colors.js';
|
||||
import { SettingsContext } from '../../contexts/SettingsContext.js';
|
||||
import { useSettings } from '../../contexts/SettingsContext.js';
|
||||
import type { LoadedSettings } from '../../../config/settings.js';
|
||||
|
||||
const STATIC_HEIGHT = 1;
|
||||
|
|
@ -247,7 +247,7 @@ export const ToolMessage: React.FC<ToolMessageProps> = ({
|
|||
ptyId,
|
||||
config,
|
||||
}) => {
|
||||
const settings = React.useContext(SettingsContext);
|
||||
const settings = useSettings();
|
||||
const isThisShellFocused =
|
||||
(name === SHELL_COMMAND_NAME || name === 'Shell') &&
|
||||
status === ToolCallStatus.Executing &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue