Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import { getSkillIcon } from "@app/lib/skill";
import { useSpaces, useSpacesSearch } from "@app/lib/swr/spaces";
import { useIsMobile } from "@app/lib/swr/useIsMobile";
import { classNames } from "@app/lib/utils";
import { getManageSkillsRoute } from "@app/lib/utils/router";
import type {
ConversationWithoutContentType,
DataSourceViewContentNode,
Expand All @@ -56,6 +57,7 @@ import type {
import {
assertNever,
getSupportedFileExtensions,
isBuilder,
normalizeError,
toRichAgentMentionType,
} from "@app/types";
Expand Down Expand Up @@ -616,6 +618,12 @@ const InputBarContainer = ({
size="xs"
label={skill.name}
icon={getSkillIcon(skill.icon)}
href={
isBuilder(owner)
? getManageSkillsRoute(owner.sId, skill.sId)
: undefined
}
target="_blank"
className="m-0.5 hidden bg-background text-foreground dark:bg-background-night dark:text-foreground-night md:flex"
onRemove={
disableInput
Expand All @@ -628,6 +636,12 @@ const InputBarContainer = ({
<Chip
size="xs"
icon={getSkillIcon(skill.icon)}
href={
isBuilder(owner)
? getManageSkillsRoute(owner.sId, skill.sId)
: undefined
}
target="_blank"
className="m-0.5 flex bg-background text-foreground dark:bg-background-night dark:text-foreground-night md:hidden"
onRemove={
disableInput
Expand Down
6 changes: 6 additions & 0 deletions front/lib/utils/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ export const getSkillBuilderRoute = (
return queryParams ? `${fullPath}?${queryParams}` : fullPath;
};

export const getManageSkillsRoute = (workspaceId: string, skillId?: string) => {
return (
`/w/${workspaceId}/builder/skills` + (skillId ? `#?skillId=${skillId}` : "")
);
};

export const getConversationRoute = (
workspaceId: string,
conversationIdOrNew: string | null = "new",
Expand Down
Loading