mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-19 02:54:28 -05:00
Compare commits
2 Commits
fix/spinne
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc77e7b6e6 | ||
|
|
ba75cc28b5 |
@@ -33,7 +33,6 @@ query SearchFeatureRequests($term: String!, $filter: IssueFilter, $first: Int) {
|
|||||||
id
|
id
|
||||||
identifier
|
identifier
|
||||||
title
|
title
|
||||||
description
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -205,7 +204,6 @@ class SearchFeatureRequestsTool(BaseTool):
|
|||||||
id=node["id"],
|
id=node["id"],
|
||||||
identifier=node["identifier"],
|
identifier=node["identifier"],
|
||||||
title=node["title"],
|
title=node["title"],
|
||||||
description=node.get("description"),
|
|
||||||
)
|
)
|
||||||
for node in nodes
|
for node in nodes
|
||||||
]
|
]
|
||||||
@@ -239,7 +237,11 @@ class CreateFeatureRequestTool(BaseTool):
|
|||||||
"Create a new feature request or add a customer need to an existing one. "
|
"Create a new feature request or add a customer need to an existing one. "
|
||||||
"Always search first with search_feature_requests to avoid duplicates. "
|
"Always search first with search_feature_requests to avoid duplicates. "
|
||||||
"If a matching request exists, pass its ID as existing_issue_id to add "
|
"If a matching request exists, pass its ID as existing_issue_id to add "
|
||||||
"the user's need to it instead of creating a duplicate."
|
"the user's need to it instead of creating a duplicate. "
|
||||||
|
"IMPORTANT: Never include personally identifiable information (PII) in "
|
||||||
|
"the title or description — no names, emails, phone numbers, company "
|
||||||
|
"names, or other identifying details. Write titles and descriptions in "
|
||||||
|
"generic, feature-focused language."
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -249,11 +251,20 @@ class CreateFeatureRequestTool(BaseTool):
|
|||||||
"properties": {
|
"properties": {
|
||||||
"title": {
|
"title": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Title for the feature request.",
|
"description": (
|
||||||
|
"Title for the feature request. Must be generic and "
|
||||||
|
"feature-focused — do not include any user names, emails, "
|
||||||
|
"company names, or other PII."
|
||||||
|
),
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Detailed description of what the user wants and why.",
|
"description": (
|
||||||
|
"Detailed description of what the user wants and why. "
|
||||||
|
"Must not contain any personally identifiable information "
|
||||||
|
"(PII) — describe the feature need generically without "
|
||||||
|
"referencing specific users, companies, or contact details."
|
||||||
|
),
|
||||||
},
|
},
|
||||||
"existing_issue_id": {
|
"existing_issue_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -117,13 +117,11 @@ class TestSearchFeatureRequestsTool:
|
|||||||
"id": "id-1",
|
"id": "id-1",
|
||||||
"identifier": "FR-1",
|
"identifier": "FR-1",
|
||||||
"title": "Dark mode",
|
"title": "Dark mode",
|
||||||
"description": "Add dark mode support",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "id-2",
|
"id": "id-2",
|
||||||
"identifier": "FR-2",
|
"identifier": "FR-2",
|
||||||
"title": "Dark theme",
|
"title": "Dark theme",
|
||||||
"description": None,
|
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
patcher, _ = _mock_linear_config(query_return=_search_response(nodes))
|
patcher, _ = _mock_linear_config(query_return=_search_response(nodes))
|
||||||
|
|||||||
@@ -486,7 +486,6 @@ class FeatureRequestInfo(BaseModel):
|
|||||||
id: str
|
id: str
|
||||||
identifier: str
|
identifier: str
|
||||||
title: str
|
title: str
|
||||||
description: str | None = None
|
|
||||||
|
|
||||||
|
|
||||||
class FeatureRequestSearchResponse(ToolResponseBase):
|
class FeatureRequestSearchResponse(ToolResponseBase):
|
||||||
|
|||||||
@@ -1,21 +1,39 @@
|
|||||||
import { useNodeStore } from "@/app/(platform)/build/stores/nodeStore";
|
import { useNodeStore } from "@/app/(platform)/build/stores/nodeStore";
|
||||||
import { Switch } from "@/components/atoms/Switch/Switch";
|
import { Button } from "@/components/atoms/Button/Button";
|
||||||
import { Text } from "@/components/atoms/Text/Text";
|
import { Text } from "@/components/atoms/Text/Text";
|
||||||
|
import { CaretDownIcon } from "@phosphor-icons/react";
|
||||||
|
|
||||||
export const NodeAdvancedToggle = ({ nodeId }: { nodeId: string }) => {
|
type Props = {
|
||||||
|
nodeId: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function NodeAdvancedToggle({ nodeId }: Props) {
|
||||||
const showAdvanced = useNodeStore(
|
const showAdvanced = useNodeStore(
|
||||||
(state) => state.nodeAdvancedStates[nodeId] || false,
|
(state) => state.nodeAdvancedStates[nodeId] || false,
|
||||||
);
|
);
|
||||||
const setShowAdvanced = useNodeStore((state) => state.setShowAdvanced);
|
const setShowAdvanced = useNodeStore((state) => state.setShowAdvanced);
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-between gap-2 rounded-b-xlarge border-t border-zinc-200 bg-white px-5 py-3.5">
|
<div className="flex items-center justify-start gap-2 bg-white px-5 pb-3.5">
|
||||||
<Text variant="body" className="font-medium text-slate-700">
|
<Button
|
||||||
Advanced
|
variant="ghost"
|
||||||
</Text>
|
className="h-fit min-w-0 p-0 hover:border-transparent hover:bg-transparent"
|
||||||
<Switch
|
onClick={() => setShowAdvanced(nodeId, !showAdvanced)}
|
||||||
onCheckedChange={(checked) => setShowAdvanced(nodeId, checked)}
|
aria-expanded={showAdvanced}
|
||||||
checked={showAdvanced}
|
>
|
||||||
/>
|
<Text
|
||||||
|
variant="body"
|
||||||
|
as="span"
|
||||||
|
className="flex items-center gap-2 !font-semibold text-slate-700"
|
||||||
|
>
|
||||||
|
Advanced{" "}
|
||||||
|
<CaretDownIcon
|
||||||
|
size={16}
|
||||||
|
weight="bold"
|
||||||
|
className={`transition-transform ${showAdvanced ? "rotate-180" : ""}`}
|
||||||
|
aria-hidden
|
||||||
|
/>
|
||||||
|
</Text>
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user