Skip to content

Commit

Permalink
Merge pull request #14 from near/develop
Browse files Browse the repository at this point in the history
devhub testnet paths
  • Loading branch information
gabehamilton authored Mar 13, 2024
2 parents b48c4c7 + b5fd1d4 commit 79d7227
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion nexus/components/src/Agent/AgentCard.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { href } = VM.require("devhub.${REPL_ACCOUNT}/widget/core.lib.url");
const { href } = VM.require("${REPL_DEVHUB}/widget/core.lib.url");

if (!href) {
return <></>;
Expand Down
4 changes: 2 additions & 2 deletions nexus/components/src/Agent/AgentChat.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { href } = VM.require("devhub.${REPL_ACCOUNT}/widget/core.lib.url");
const { href } = VM.require("${REPL_DEVHUB}/widget/core.lib.url");
const storedModel = Storage.get("agent-model");
const storedLocalModel = Storage.get("agent-local-model");
const storedCredentialType = Storage.get("agent-credential-type");
Expand Down Expand Up @@ -454,7 +454,7 @@ return (
<div key={i} className={`message ${role}`}>
{role === "user" && (
<UserMessage>
<Widget src="mob.${REPL_ACCOUNT}/widget/N.ProfileLine" props={{ accountId: context.accountId }} />
<Widget src="${REPL_MOB}/widget/N.ProfileLine" props={{ accountId: context.accountId }} />
<Markdown text={content} />
</UserMessage>
)}
Expand Down
11 changes: 9 additions & 2 deletions nexus/components/src/Agent/AgentDetails.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { href } = VM.require("devhub.${REPL_ACCOUNT}/widget/core.lib.url");
const { href } = VM.require("${REPL_DEVHUB}/widget/core.lib.url");
const { schema } = VM.require(`${REPL_AGIGUILD}/widget/Schema.Agent`);
if (!href || !schema ) {
return <></>;
Expand Down Expand Up @@ -90,6 +90,13 @@ const agentProperties = (obj) => {
);
};

const customComponentLabel = (component) => {
if (component === `agiguild.near/widget/Agent.AgentChat`) {
return "Chat";
}
return <Widget src="${REPL_ACCOUNT}/widget/DIG.Tooltip" props={{ content: <p>{component}</p>, trigger: "Chat (Custom component)"}} />;
}

return (
<Wrapper>
<Link to={listLink}>
Expand Down Expand Up @@ -128,7 +135,7 @@ return (
icon: editIcon,
},
{
name: "Chat " + agentComponent,
name: customComponentLabel(agentComponent),
value: "chat",
content: <Widget src={agentComponent} props={{ src, embedded: true }} />,
icon: "ph ph-code",
Expand Down
4 changes: 2 additions & 2 deletions nexus/components/src/Agent/AgentSummary.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (!props.agent) return "";
const { href } = VM.require("devhub.${REPL_ACCOUNT}/widget/core.lib.url");
const { href } = VM.require("${REPL_DEVHUB}/widget/core.lib.url");
if (!href) {
return <></>;
}
Expand Down Expand Up @@ -153,7 +153,7 @@ return (
<Header size={size}>
<Thumbnail size={size}>
<Widget
src="mob.${REPL_ACCOUNT}/widget/Image"
src="${REPL_MOB}/widget/Image"
props={{
image: { url: logoUrl },
fallbackUrl: "https://ipfs.near.social/ipfs/bafkreibysr2mkwhb4j36h2t7mqwhynqdy4vzjfygfkfg65kuspd2bawauu",
Expand Down
2 changes: 1 addition & 1 deletion nexus/components/src/Placeholder.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { href } = VM.require("devhub.${REPL_ACCOUNT}/widget/core.lib.url");
const { href } = VM.require("${REPL_DEVHUB}/widget/core.lib.url");
if (!href) {
return <></>;
}
Expand Down
4 changes: 3 additions & 1 deletion nexus/replacements.dev.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"REPL_ACCOUNT": "discom-dev.testnet",
"REPL_NEAR_URL": "test.near.org",
"REPL_AGIGUILD": "agiguild-dev.testnet"
"REPL_AGIGUILD": "agiguild-dev.testnet",
"REPL_MOB": "eugenethedream",
"REPL_DEVHUB": "devhub-dev.testnet"
}
4 changes: 3 additions & 1 deletion nexus/replacements.mainnet.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"REPL_ACCOUNT": "near",
"REPL_AGIGUILD": "agiguild.near",
"REPL_NEAR_URL": "near.org"
"REPL_NEAR_URL": "near.org",
"REPL_MOB": "mob.near",
"REPL_DEVHUB": "devhub.near"
}
4 changes: 3 additions & 1 deletion nexus/replacements.testnet.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"REPL_ACCOUNT": "discom.testnet",
"REPL_NEAR_URL": "test.near.org",
"REPL_AGIGUILD": "agiguild.testnet"
"REPL_AGIGUILD": "agiguild.testnet",
"REPL_MOB": "eugenethedream",
"REPL_DEVHUB": "devhubtest.testnet"
}

0 comments on commit 79d7227

Please sign in to comment.