mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-23 18:10:26 +08:00
fix: update input schema reference in MessageTools for accurate tool … (#5804)
* fix: update input schema reference in MessageTools for accurate tool response handling * refactor: remove unused CustomEditorContainer styles from MiniAppSettings --------- Co-authored-by: kanweiwei <kanweiwei@nutstore.net>
This commit is contained in:
parent
a6a8324cdb
commit
3697b31c7b
@ -30,7 +30,7 @@ const MessageTools: FC<Props> = ({ blocks }) => {
|
|||||||
try {
|
try {
|
||||||
return JSON.stringify(
|
return JSON.stringify(
|
||||||
{
|
{
|
||||||
params: toolResponse?.tool?.inputSchema,
|
params: toolResponse?.arguments,
|
||||||
response: toolResponse?.response
|
response: toolResponse?.response
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
|
|||||||
@ -230,17 +230,4 @@ const BorderedContainer = styled.div`
|
|||||||
background-color: var(--color-bg-1);
|
background-color: var(--color-bg-1);
|
||||||
`
|
`
|
||||||
|
|
||||||
// 新增自定义编辑器容器样式
|
|
||||||
const CustomEditorContainer = styled.div`
|
|
||||||
margin: 8px 0;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px solid var(--color-border);
|
|
||||||
border-radius: 8px;
|
|
||||||
background-color: var(--color-bg-1);
|
|
||||||
|
|
||||||
.ant-input {
|
|
||||||
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
export default MiniAppSettings
|
export default MiniAppSettings
|
||||||
|
|||||||
@ -140,7 +140,7 @@ const formatCitationsFromBlock = (block: CitationMessageBlock | undefined): Cita
|
|||||||
case WebSearchSource.ANTHROPIC:
|
case WebSearchSource.ANTHROPIC:
|
||||||
formattedCitations =
|
formattedCitations =
|
||||||
(block.response.results as Array<WebSearchResultBlock>)?.map((result, index) => {
|
(block.response.results as Array<WebSearchResultBlock>)?.map((result, index) => {
|
||||||
const {url} = result
|
const { url } = result
|
||||||
let hostname: string | undefined
|
let hostname: string | undefined
|
||||||
try {
|
try {
|
||||||
hostname = new URL(url).hostname
|
hostname = new URL(url).hostname
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user