Просмотр исходного кода

Merge remote-tracking branch 'origin/main' into r1-display-reason

Matt Rubens 11 месяцев назад
Родитель
Сommit
60749237ff

+ 5 - 0
.changeset/healthy-oranges-drum.md

@@ -0,0 +1,5 @@
+---
+"roo-cline": patch
+---
+
+Add a dropdown to select the API configuration for a mode in the Prompts tab

+ 5 - 0
.changeset/new-keys-relax.md

@@ -0,0 +1,5 @@
+---
+"roo-cline": patch
+---
+
+Fix bug where always allow wasn't showing up for MCP tools

+ 1 - 4
webview-ui/src/components/chat/Announcement.tsx

@@ -12,7 +12,6 @@ interface AnnouncementProps {
 You must update the latestAnnouncementId in ClineProvider for new announcements to show to users. This new id will be compared with whats in state for the 'last announcement shown', and if it's different then the announcement will render. As soon as an announcement is shown, the id will be updated in state. This ensures that announcements are not shown more than once, even if the user doesn't close it themselves.
 */
 const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
-	const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0
 	return (
 		<div
 			style={{
@@ -29,9 +28,7 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
 				style={{ position: "absolute", top: "8px", right: "8px" }}>
 				<span className="codicon codicon-close"></span>
 			</VSCodeButton>
-			<h2 style={{ margin: "0 0 8px" }}>
-				🎉{"  "}Introducing Roo Code {minorVersion}
-			</h2>
+			<h2 style={{ margin: "0 0 8px" }}>🎉{"  "}Introducing Roo Code 3.2</h2>
 
 			<p style={{ margin: "5px 0px" }}>
 				Our biggest update yet is here - we're officially changing our name from Roo Cline to Roo Code! After

+ 2 - 1
webview-ui/src/components/chat/ChatRow.tsx

@@ -79,7 +79,7 @@ export const ChatRowContent = ({
 	isLast,
 	isStreaming,
 }: ChatRowContentProps) => {
-	const { mcpServers } = useExtensionState()
+	const { mcpServers, alwaysAllowMcp } = useExtensionState()
 	const [reasoningCollapsed, setReasoningCollapsed] = useState(false)
 
 	// Auto-collapse reasoning when new messages arrive
@@ -888,6 +888,7 @@ export const ChatRowContent = ({
 														)?.alwaysAllow || false,
 												}}
 												serverName={useMcpServer.serverName}
+												alwaysAllowMcp={alwaysAllowMcp}
 											/>
 										</div>
 										{useMcpServer.arguments && useMcpServer.arguments !== "{}" && (

+ 31 - 0
webview-ui/src/components/prompts/PromptsView.tsx

@@ -43,6 +43,7 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 		customModePrompts,
 		customSupportPrompts,
 		listApiConfigMeta,
+		currentApiConfigName,
 		enhancementApiConfigId,
 		setEnhancementApiConfigId,
 		mode,
@@ -609,6 +610,36 @@ const PromptsView = ({ onDone }: PromptsViewProps) => {
 					</div>
 					{/* Mode settings */}
 					<>
+						<div style={{ marginBottom: "12px" }}>
+							<div style={{ fontWeight: "bold", marginBottom: "4px" }}>API Configuration</div>
+							<div style={{ marginBottom: "8px" }}>
+								<VSCodeDropdown
+									value={currentApiConfigName || ""}
+									onChange={(e: any) => {
+										const value = e.detail?.target?.value || e.target?.value
+										vscode.postMessage({
+											type: "loadApiConfiguration",
+											text: value,
+										})
+									}}
+									style={{ width: "100%" }}>
+									{(listApiConfigMeta || []).map((config) => (
+										<VSCodeOption key={config.id} value={config.name}>
+											{config.name}
+										</VSCodeOption>
+									))}
+								</VSCodeDropdown>
+								<div
+									style={{
+										fontSize: "12px",
+										marginTop: "5px",
+										color: "var(--vscode-descriptionForeground)",
+									}}>
+									Select which API configuration to use for this mode
+								</div>
+							</div>
+						</div>
+
 						{/* Show tools for all modes */}
 						<div style={{ marginBottom: "16px" }}>
 							<div