Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
gabehamilton committed May 3, 2024
1 parent 2b323d6 commit 9b7a574
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 34 deletions.
18 changes: 11 additions & 7 deletions nexus/components/src/AI/Agent/AgentCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ const Card = styled.div`
height: 100%;
transition: all 300ms;
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
box-shadow:
0 1px 3px 0 rgb(0 0 0 / 0.1),
0 1px 2px -1px rgb(0 0 0 / 0.1);
&:hover {
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
box-shadow:
0 4px 6px -1px rgb(0 0 0 / 0.1),
0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.logo {
Expand Down Expand Up @@ -130,11 +134,11 @@ const AgentCard = ({ item, editFunction }) => {
const agentComponent = item.component
? item.component
: `${REPL_ACCOUNT}/widget/AI.Agent.AgentChat`;
const imageUrl = logoUrl
? typeof logoUrl == "string" && logoUrl.startsWith("http")
? logoUrl
: ipfsUrl(logoUrl)
: "https://ipfs.near.social/ipfs/bafkreibysr2mkwhb4j36h2t7mqwhynqdy4vzjfygfkfg65kuspd2bawauu";
const imageUrl = logoUrl
? typeof logoUrl == "string" && logoUrl.startsWith("http")
? logoUrl
: ipfsUrl(logoUrl)
: "https://ipfs.near.social/ipfs/bafkreibysr2mkwhb4j36h2t7mqwhynqdy4vzjfygfkfg65kuspd2bawauu";
const actionLink = href({
widgetSrc: agentComponent,
params: { src: `${accountId}/agent/${name}` },
Expand Down
4 changes: 2 additions & 2 deletions nexus/components/src/AI/Nexus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const [activeTabs, setActiveTabs] = useState(
agentTools: "contractTool",
dataSources: "dataSource",
verifications: "dataReputation",
}
},
);

useEffect(() => {
Expand Down Expand Up @@ -121,7 +121,7 @@ const renderContent = () => {
return content.subGroups(
activeGroup,
schema[activeGroup],
globalTagFilter // forces re-render, gets passed through Storage
globalTagFilter,
);
}
};
Expand Down
18 changes: 9 additions & 9 deletions nexus/components/src/AI/Overview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ query ListQuery($offset: Int, $limit: Int) {
};
const queryName = "ListQuery";
const loadItemsQueryApi = VM.require(
"${REPL_ACCOUNT}/widget/Entities.QueryApi.Client"
"${REPL_ACCOUNT}/widget/Entities.QueryApi.Client",
)?.loadItems;
if (!loadItemsQueryApi) {
return <p>Loading modules...</p>;
Expand Down Expand Up @@ -486,7 +486,7 @@ return (
href={buildAgentUrl(
app.attributes.component,
app.account_id,
app.name
app.name,
)}
url={app.logo_url}
name={app.display_name}
Expand Down Expand Up @@ -535,13 +535,13 @@ return (
</p>
<p>
For example, if you are building an open source NEAR Co-pilot you
might share pieces for others to compose with. That
could be training datasets of Contract or Component code. You might
share a trained model by uploading the weights; then separate out
the framework code and finally add the Co-pilot to the agent
directory for use by end users. Another developer might then use
those pieces to create a code security checking agent that
interoperates with your coding Co-pilot.
might share pieces for others to compose with. That could be
training datasets of Contract or Component code. You might share a
trained model by uploading the weights; then separate out the
framework code and finally add the Co-pilot to the agent directory
for use by end users. Another developer might then use those pieces
to create a code security checking agent that interoperates with
your coding Co-pilot.
</p>
<p>
If you need more, this UI is composed of React-on-Chain components
Expand Down
32 changes: 16 additions & 16 deletions nexus/components/src/AI/Schema/Nexus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ const schema = {
icon: "ph ph-list-checks",
defaultValue: "trainingDataset",
items: [
{
name: "Training Datasets",
value: "trainingDataset",
content: (contentProps) => (
<Widget
src="${REPL_ACCOUNT}/widget/Entities.Template.GenericEntityConfig"
props={{
entityType: "trainingDataset",
schemaFile: "${REPL_ACCOUNT}/widget/AI.Schema.TrainingDataset",
...contentProps,
}}
/>
),
icon: "ph ph-chart-bar-horizontal",
},
{
{
name: "Training Datasets",
value: "trainingDataset",
content: (contentProps) => (
<Widget
src="${REPL_ACCOUNT}/widget/Entities.Template.GenericEntityConfig"
props={{
entityType: "trainingDataset",
schemaFile: "${REPL_ACCOUNT}/widget/AI.Schema.TrainingDataset",
...contentProps,
}}
/>
),
icon: "ph ph-chart-bar-horizontal",
},
{
name: "Crowdsourcing",
value: "crowdsourcedDataset",
content: (contentProps) => (
Expand Down

0 comments on commit 9b7a574

Please sign in to comment.