Skip to content

Commit

Permalink
providers - proxy url, slugifying fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bklzn committed Jul 17, 2024
1 parent 26b2a71 commit 84c620d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ui/src/helpers/aiProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import slugify from 'slugify';

export const toSlug = (text: string) => {
const newText = text.replace(/^\d+|[@*()+:'"~]/g, '');
const newText = text.replace(/^\d+|[@*()+:'"~]/g, '').replace(/_/g, '-');
return slugify(newText, {
replacement: '-',
lower: true
Expand Down
1 change: 0 additions & 1 deletion ui/src/pages/Portfolio/TagCosts.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
Area,
AreaChart,
Brush,
CartesianGrid,
Legend,
ResponsiveContainer,
Expand Down
6 changes: 3 additions & 3 deletions ui/src/pages/Project/AiProvidersList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ const ProviderDescription: React.FC<{
<Text>Proxy URL:</Text>
</Col>
<Col flex="auto">
<Text copyable>{makeUrl(slug, el.deployment_name)}</Text>
<Text copyable>{makeUrl(slug, el.slug)}</Text>
</Col>
</Row>
<Row gutter={12}>
Expand Down Expand Up @@ -398,15 +398,15 @@ const ProviderDescription: React.FC<{
<Flex gap={16}>
<Input
className="max-w-[50%] w-full"
value={makeUrl(slug, el.deployment_name) + AllTags}
value={makeUrl(slug, el.slug) + AllTags}
disabled
/>
<Button
type="primary"
icon={<CopyOutlined />}
onClick={() => {
navigator.clipboard.writeText(
makeUrl(slug, el.deployment_name) + AllTags
makeUrl(slug, el.slug) + AllTags
);
}}
/>
Expand Down

0 comments on commit 84c620d

Please sign in to comment.