Skip to content

Commit

Permalink
Merge pull request #473 from nerdalert/doc-paths
Browse files Browse the repository at this point in the history
Bug fix: fix the knowledge doc repo path and repo url/path validation
  • Loading branch information
vishnoianil authored Jan 16, 2025
2 parents e3154b5 + 4723c1c commit 11e94e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ const DocumentInformation: React.FC<Props> = ({
<FormGroup isRequired key={'doc-info-details-id'} label="Repo URL or Server Side File Path">
<TextInput
isRequired
type="url"
// TODO: once all of the different potential filepaths/url/types are determined, add back stricter validation
type="text"
aria-label="repo"
validated={validRepo}
placeholder="Enter repo URL where document exists"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const KnowledgeQuestionAnswerPairsNative: React.FC<Props> = ({
const preRefs = useRef<Record<string, HTMLPreElement | null>>({});

const LOCAL_TAXONOMY_DOCS_ROOT_DIR =
process.env.NEXT_PUBLIC_LOCAL_TAXONOMY_DOCS_ROOT_DIR || '/home/yourusername/.instructlab-ui/taxonomy-knowledge-docs';
`${process.env.NEXT_PUBLIC_LOCAL_TAXONOMY_ROOT_DIR}/taxonomy-knowledge-docs` || `${process.env.HOME}/.instructlab-ui/taxonomy-knowledge-docs`;

const fetchKnowledgeFiles = async () => {
setIsLoading(true);
Expand Down

0 comments on commit 11e94e6

Please sign in to comment.