Skip to content

Commit

Permalink
PR CHANGES
Browse files Browse the repository at this point in the history
  • Loading branch information
namansleeps2 committed Sep 12, 2023
1 parent 1fe6a41 commit 307169c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 30 deletions.
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ services:
NEXT_PUBLIC_API_BASE_URL: "/api"
networks:
- super_network
volumes:
- ./gui:/app
- /app/node_modules/
- /app/.next/
# volumes:
# - ./gui:/app
# - /app/node_modules/
# - /app/.next/
super__redis:
image: "redis/redis-stack-server:latest"
networks:
Expand Down
1 change: 0 additions & 1 deletion gui/pages/Content/Agents/AgentWorkspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ export default function AgentWorkspace({env, agentId, agentName, selectedView, a
data = data.filter((run) => run.status !== 'TERMINATED');
setAgentExecutions(data);
setSelectedRun(currentRun ? currentRun : data[0]);
console.log(data)
})
.catch((error) => {
console.error('Error fetching agent executions:', error);
Expand Down
25 changes: 0 additions & 25 deletions gui/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,29 +481,4 @@ export const modelIcon = (model) => {
}

return icons[model];
}


export const parseTextWithLinks = (text) => {
// Regular expression to match URLs with or without http(s)
const urlPattern = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])|(\b(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+(?:[a-z0-9-]{2,6}))\b/gi;

// Splitting the text by URLs
const parts = text.split(urlPattern);

// Replacing each URL in the original text with JSX
for (let i = 0; i < parts.length; i++) {
let part = parts[i];
if (urlPattern.test(part)) {
let url = part;
// If URL does not start with http(s):// or ftp:// or file://, then prepend it with http://
if (!/^(\b(https?|ftp|file):\/\/)/i.test(part)) {
url = 'http://' + part;
}

parts[i] = <a href={url} key={i} target="_blank" rel="noopener noreferrer">{part}</a>;
}
}

return parts;
}

0 comments on commit 307169c

Please sign in to comment.