Skip to content

Commit

Permalink
restore tab title, devhub path
Browse files Browse the repository at this point in the history
  • Loading branch information
gabehamilton committed Mar 13, 2024
1 parent cc7b634 commit c1e5589
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 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("devhub.near/widget/core.lib.url");

if (!href) {
return <></>;
Expand Down
2 changes: 1 addition & 1 deletion 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("devhub.near/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
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("devhub.near/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="near/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
2 changes: 1 addition & 1 deletion 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("devhub.near/widget/core.lib.url");
if (!href) {
return <></>;
}
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("devhub.near/widget/core.lib.url");
if (!href) {
return <></>;
}
Expand Down

0 comments on commit c1e5589

Please sign in to comment.