-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: MVP Knowledge #1256
Closed
Closed
feat: MVP Knowledge #1256
Changes from 207 commits
Commits
Show all changes
218 commits
Select commit
Hold shift + click to select a range
615d9e5
feat: init structure
thewbuk 518a236
feat: frst card components and sidebar
thewbuk 65e13fd
feat sidebar and popup
thewbuk 80de628
feat styling cards
thewbuk 0f17631
feat in card menu
thewbuk 8545140
feat: start delete popup
thewbuk 1e622b1
feat styling
thewbuk 7805051
Test GPG signing
thewbuk e884390
feat: styling
thewbuk 0215a03
fix: delete dialog
thewbuk 665b337
feat: edit info start
thewbuk 6019817
feat: edit info
thewbuk 2e27112
fix padding in delete dropdown
thewbuk 74d92b2
feat: deletion confirmation
thewbuk ad14a1c
fix timing
thewbuk aa2d50c
feat: backend start
thewbuk e503042
backend setup
thewbuk 2409959
update backend
thewbuk ab726af
update apis
thewbuk c546936
add tabs
thewbuk 93aaff5
working tab swicth
thewbuk 57fc6a1
feat: upload tab start
thewbuk aa0d899
add conent to upload tab
thewbuk 1ba21b4
feat: upload styling
thewbuk df3c0e2
fix: propagation overlay
thewbuk 10aa210
start fixing styling in explore tab
thewbuk 32ec02b
comment v2
thewbuk 470f79e
update styling
thewbuk a4474c8
styling changes
thewbuk 6e34fb3
styling changes
thewbuk a8e9264
refactor code and update apis
thewbuk 0732799
add catalog tab
thewbuk b41eb24
uodate to tags
thewbuk 567e6c6
styling in catalog tab
thewbuk 49b04ba
finish styling
thewbuk 413ac6b
add comments
thewbuk 6010a2f
pass name to tabs
thewbuk 951c3f0
uncomment the navbar
thewbuk 6fe2c36
fix: icons not visble
thewbuk 894a3b0
fix icon size
thewbuk 4797c89
fix icon spacing
thewbuk fd7d5df
margin fixes
thewbuk 037c644
file padding fixes
thewbuk bc70e8d
code refactor
thewbuk f51fc8c
add loading skeletons
thewbuk 85ec055
fix preview padding
thewbuk fdfc805
fix padding headers
thewbuk 8ad003e
add cursor pointer to browse
thewbuk 26866e3
small margin fixes
thewbuk 59dcbef
remove gap-y in tabs
thewbuk 8b8713c
update drag radius
thewbuk b3a17c6
move function to query
thewbuk 3dca4df
update apis and types
thewbuk 60e36b1
fix import in veiw
thewbuk 1db2a05
update apis up to updated spec
thewbuk f159beb
fix typos
thewbuk 50c7bd5
update api endpoints to match d0
thewbuk 1496687
update imports
thewbuk af1e709
update apis
thewbuk d7b42fc
add edit dialog
thewbuk b51a28d
disable dialog button if not filled
thewbuk 246c6f6
fix: disabled buttons
thewbuk d0d5b3c
update mock data in uploud
thewbuk f013077
fix cloning
thewbuk 40b2fe9
change to % in progress
thewbuk b470277
added close button to delete confirmation
thewbuk 8cf4c39
UI changes, add modify button start on persitant delete notyfication
thewbuk d724dad
refactor delete
thewbuk 15b25dc
fixes for the delete modal
thewbuk 78c5764
fixes to the delete confirmation
thewbuk 6ccdd70
refactor code
thewbuk 861dc04
rename createInstillAxiosClient variable
thewbuk 1e5684b
add name tranform to conform to standard in kb
thewbuk dc9b95a
edit knowladge base to conform to norm with name
thewbuk a22a36e
fix: delete pop up timeout
thewbuk e2bd8f2
formatting
thewbuk df9cbcc
fix build error
thewbuk 75dbead
fix linting
thewbuk 3b36f70
fix linting 2
thewbuk b0e9456
fix lint 3
thewbuk afdbd13
fix linting 4
thewbuk 6c4e4e7
fix lint 5
thewbuk 9853b35
formatting final
thewbuk 3efa2fd
add nav link to components
thewbuk 50a0f07
PR fixes
thewbuk 562a1ea
PR fixes
thewbuk fc3a42b
allow nullable uid
thewbuk 44718a4
formatting
thewbuk 9bf00a5
add uploud api
thewbuk 4ef8937
feat: drag and drop start
thewbuk 99664d5
feat: fix drag and drop
thewbuk 4297943
change handle drag div type
thewbuk 93f6c8e
update tabs
thewbuk e09a5f4
align classnames
thewbuk 53afe5d
styling changes
thewbuk cde0db1
styling updates
thewbuk 5885fbf
change widths of columns
thewbuk 6934c46
add separator
thewbuk 13cfd2d
fix: paddings and borders
thewbuk a8fbe3a
add new tabs
thewbuk da235e3
feat: add new tabs
thewbuk 2821db3
add chunk tab
thewbuk 50ded45
finish Chunk Tab
thewbuk e57d2ca
add image tab
thewbuk f7677f5
add metadata component
thewbuk 5c8b95d
align metadat with design
thewbuk 00c7654
fix sidebar reset
thewbuk 8ce7335
add image tab
thewbuk c9fd60b
add select user
thewbuk 3188479
add process file button
thewbuk e647cbf
clean up start
thewbuk 9bf60ee
add delete button
thewbuk 3547c94
add delete button to uploaded file
thewbuk 3c535fe
disable process file functionality
thewbuk dafe07f
ts fixes
thewbuk 59b9599
refactor catalog tab
thewbuk 02a6d6a
update catalog
thewbuk ea52f8d
implement namespace when creating kb
thewbuk 4fcb9b0
add EntitySelector
thewbuk 3ae6d56
fix the error message position
thewbuk adf8854
fix spacing between inputs
thewbuk 612ffc4
fix form validation
thewbuk 0f7af57
fix row heigtht changes
thewbuk 05b1f8f
keep fixed gaps between cards
thewbuk 9d9ba49
fix api to get kbs
thewbuk 6b40d05
add file to big pop up
thewbuk 6a95a9b
added unsupported file type pop up
thewbuk 0c8a5e9
change pop ups width to fixed
thewbuk 87c077b
fix the pop up behaviour in catalog tab
thewbuk 3a4320b
add delete file pop up
thewbuk 1bd9ea1
code refactor start
thewbuk dd9167b
add timeouts to upload tab
thewbuk e340440
fix corner radius in pop ups
thewbuk 18111c0
fix mock data in catalog
thewbuk eb7c7f7
adjust padding when in catalog
thewbuk fea5470
fix typescript
thewbuk 01af0d1
fix drag and drop
thewbuk f18642e
fix border changes on drop file
thewbuk e37fce8
fix metatag
thewbuk cb98d34
formatting
thewbuk d7820e4
fix linting
thewbuk b039913
change navlinks to Knowledge
thewbuk 7a400c2
fix linting and typo
thewbuk 3c74fd7
finish fixing linting
thewbuk 32d0ef5
fix rename update local state
thewbuk dd168ee
update header
thewbuk be16b73
review hotfixes
thewbuk 8b319c8
preselect entity
thewbuk c774503
reset create kb dialog every time
thewbuk 7ce7db4
code refactor for creating kb
thewbuk 7bc6509
remove stroke from icon
thewbuk 0a61001
fix page paddings
thewbuk 80be60f
hotfixes
thewbuk dcf2ae2
fix border dashes
thewbuk e98ae5e
refactor: Update knowledge base creation logic
thewbuk 1a0b9dd
Update knowledge base types and API calls
thewbuk d789043
fix the icon
thewbuk ea6587c
Refactor knowledge base creation logic and update API calls
thewbuk 871ccb4
remove tags from mvp
thewbuk b97a8e5
add credit usage notification
thewbuk 6235b74
Added tooltip to kb cards
thewbuk 9728bfd
add search and sort options UI
thewbuk 12fcbe6
align sort options with applications
thewbuk a017566
start file overlay for chunks
thewbuk 4e3fc41
add icon to collapsable part of sidebar
thewbuk 3b47fcb
add dots to status file tags
thewbuk 9495abf
add search to the dashboard
thewbuk d4a4ea8
display credit pop up when file is processed
thewbuk 29890aa
fix the sidebar icon and options
thewbuk c17d61e
add upload api calls
thewbuk 81f50dc
update the file apis
thewbuk c28e320
fix fileUid typo in API call
thewbuk b4d537f
fix display the file props start
thewbuk adcf45d
keep the file name one line
thewbuk 2ff8715
start chunk overlay
thewbuk fb411f8
start chunk file api and move to api in chunk tab
thewbuk 51c097d
add limit to number of kb created
thewbuk c7c335e
ui fixes
thewbuk 9a7e6d2
retrieve test tab added
thewbuk 1e1de95
fix spaces in copy button
thewbuk d749e50
search descriptions
thewbuk 082e473
fix the clone/edit/delete in the main tab
thewbuk 603512b
fix the catalog tab and add auto refresh for the file status
thewbuk a431b82
change file overlay to use Dialog
thewbuk 7b9eebb
only check the file status if not all completed
thewbuk 78ba6e3
implement api for the chunk tab
thewbuk 759c09a
fix the file name in overlay
thewbuk 75ac586
fix displaying the chunks in the tab
thewbuk cea50e8
finish the chunk, token and highlight implementation
thewbuk 55e559d
add icons for doc types
thewbuk 6db24c1
updates to chunk tab
thewbuk a121a39
fix undo delete file in catalog tab
thewbuk e13c023
fix the sorting
thewbuk 9bf1255
fix uploud multiple files
thewbuk a1eda8c
add file type to file details overlay
thewbuk fee4867
use codeBlock in retrieve tab
thewbuk c12fc89
fix the codeblocks, tooltip
thewbuk d9df2e3
change the tab name
thewbuk 1f37469
update the apis to a new structure
thewbuk fe18d18
PR fixes
thewbuk 3da7e2c
PR fixes
thewbuk 9496cb4
PR fixes
thewbuk 6a493f7
PR fixes
thewbuk 2351234
restructure api calls
thewbuk 3fe6006
move all apis to client
thewbuk fdc91c4
update the api calls
thewbuk 0782841
update the api calls
thewbuk 0076bcd
env fixes
thewbuk 4a555c0
update functions
thewbuk 39020d4
update api calls
thewbuk 3382502
fix artifact client
thewbuk a28cb03
fix artifact imports
thewbuk 5a95f7e
fix CreditUsageFileNotification export
thewbuk cf16df9
change xports to defaults
thewbuk 7c74bcf
fix typo and render
thewbuk 42b107d
move api client to artifact
thewbuk fb2a252
add artifact client to api calls
thewbuk 83dbee4
start fixing ts issues
thewbuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Metadata } from "next"; | ||
import { KnowladgeBasePageRender } from "./render"; | ||
|
||
export async function generateMetadata() { | ||
const metadata: Metadata = { | ||
title: `Instill Cloud | Knowledge`, | ||
openGraph: { | ||
images: ["/instill-open-graph.png"], | ||
}, | ||
}; | ||
|
||
return Promise.resolve(metadata); | ||
} | ||
|
||
export default async function Page() { | ||
return <KnowladgeBasePageRender />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"use client"; | ||
|
||
import { AppTopbar, KnowledgeBaseView, PageBase } from "@instill-ai/toolkit"; | ||
import { useAppAccessToken } from "lib/use-app-access-token"; | ||
import { useAppTrackToken } from "lib/useAppTrackToken"; | ||
import { useRouter } from "next/navigation"; | ||
|
||
export const KnowladgeBasePageRender = () => { | ||
const router = useRouter(); | ||
|
||
const accessToken = useAppAccessToken(); | ||
useAppTrackToken({ enabled: true }); | ||
// useInitAmplitude(); | ||
|
||
return ( | ||
<PageBase> | ||
<AppTopbar /> | ||
<PageBase.Container> | ||
<PageBase.Content contentPadding="!p-0"> | ||
<KnowledgeBaseView | ||
accessToken={accessToken.isSuccess ? accessToken.data : null} | ||
enableQuery={accessToken.isSuccess} | ||
router={router} | ||
/> | ||
</PageBase.Content> | ||
</PageBase.Container> | ||
</PageBase> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"use client"; | ||
|
||
import * as React from "react"; | ||
import { IconBase, IconBaseProps } from "./IconBase"; | ||
|
||
export const GraduationHat = React.forwardRef< | ||
SVGSVGElement, | ||
Omit<IconBaseProps, "viewBox" | "children"> | ||
>((props, ref) => { | ||
const { className, ...passThrough } = props; | ||
return ( | ||
<IconBase | ||
{...passThrough} | ||
ref={ref} | ||
viewBox="0 0 24 24" | ||
className={className} | ||
> | ||
<path | ||
d="M17 14.5001V11.4945C17 11.315 17 11.2253 16.9727 11.146C16.9485 11.076 16.9091 11.0122 16.8572 10.9592C16.7986 10.8993 16.7183 10.8592 16.5578 10.779L12 8.50006M4 9.50006V16.3067C4 16.6786 4 16.8645 4.05802 17.0274C4.10931 17.1713 4.1929 17.3016 4.30238 17.4082C4.42622 17.5287 4.59527 17.6062 4.93335 17.7612L11.3334 20.6945C11.5786 20.8069 11.7012 20.8631 11.8289 20.8853C11.9421 20.9049 12.0579 20.9049 12.1711 20.8853C12.2988 20.8631 12.4214 20.8069 12.6666 20.6945L19.0666 17.7612C19.4047 17.6062 19.5738 17.5287 19.6976 17.4082C19.8071 17.3016 19.8907 17.1713 19.942 17.0274C20 16.8645 20 16.6786 20 16.3067V9.50006M2 8.50006L11.6422 3.67895C11.7734 3.61336 11.839 3.58056 11.9078 3.56766C11.9687 3.55622 12.0313 3.55622 12.0922 3.56766C12.161 3.58056 12.2266 3.61336 12.3578 3.67895L22 8.50006L12.3578 13.3212C12.2266 13.3868 12.161 13.4196 12.0922 13.4325C12.0313 13.4439 11.9687 13.4439 11.9078 13.4325C11.839 13.4196 11.7734 13.3868 11.6422 13.3212L2 8.50006Z" | ||
strokeWidth="2" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</IconBase> | ||
); | ||
}); | ||
GraduationHat.displayName = "IconGraduationHat"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use client"; | ||
|
||
import * as React from "react"; | ||
import { IconBase, IconBaseProps } from "./IconBase"; | ||
|
||
export const MDFile = React.forwardRef< | ||
SVGSVGElement, | ||
Omit<IconBaseProps, "viewBox" | "children"> | ||
>((props, ref) => { | ||
const { className, ...passThrough } = props; | ||
return ( | ||
<IconBase | ||
{...passThrough} | ||
ref={ref} | ||
viewBox="0 0 24 24" | ||
className={className} | ||
> | ||
<path d="M0 4.88648C0 2.67734 1.79086 0.886475 4 0.886475H20L32 12.8865V36.8865C32 39.0956 30.2091 40.8865 28 40.8865H4C1.79086 40.8865 0 39.0956 0 36.8865V4.88648Z" fill="#316FED" /> | ||
<path opacity="0.3" d="M20 0.886475L32 12.8865H24C21.7909 12.8865 20 11.0956 20 8.88647V0.886475Z" fill="white" /> | ||
</IconBase> | ||
); | ||
}); | ||
MDFile.displayName = "IconMDFile"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use client"; | ||
|
||
import * as React from "react"; | ||
import { IconBase, IconBaseProps } from "./IconBase"; | ||
|
||
export const PDFFile = React.forwardRef< | ||
SVGSVGElement, | ||
Omit<IconBaseProps, "viewBox" | "children"> | ||
>((props, ref) => { | ||
const { className, ...passThrough } = props; | ||
return ( | ||
<IconBase | ||
{...passThrough} | ||
ref={ref} | ||
viewBox="0 0 24 24" | ||
className={className} | ||
> | ||
<path d="M0 4.88648C0 2.67734 1.79086 0.886475 4 0.886475H20L32 12.8865V36.8865C32 39.0956 30.2091 40.8865 28 40.8865H4C1.79086 40.8865 0 39.0956 0 36.8865V4.88648Z" fill="#E02E3D" /> | ||
<path opacity="0.3" d="M20 0.886475L32 12.8865H24C21.7909 12.8865 20 11.0956 20 8.88647V0.886475Z" fill="white" /> | ||
</IconBase> | ||
); | ||
}); | ||
PDFFile.displayName = "IconPDFFile"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"use client"; | ||
|
||
import * as React from "react"; | ||
import { IconBase, IconBaseProps } from "./IconBase"; | ||
|
||
export const SlashDivider = React.forwardRef< | ||
SVGSVGElement, | ||
Omit<IconBaseProps, "viewBox" | "children"> | ||
>((props, ref) => { | ||
const { className, ...passThrough } = props; | ||
return ( | ||
<IconBase | ||
{...passThrough} | ||
ref={ref} | ||
viewBox="0 0 24 24" | ||
className={className} | ||
> | ||
<path | ||
d="M1 21L11 1" | ||
strokeWidth="2" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</IconBase> | ||
); | ||
}); | ||
SlashDivider.displayName = "SlashDivider"; | ||
thewbuk marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use client"; | ||
|
||
import * as React from "react"; | ||
import { IconBase, IconBaseProps } from "./IconBase"; | ||
|
||
export const TXTFile = React.forwardRef< | ||
SVGSVGElement, | ||
Omit<IconBaseProps, "viewBox" | "children"> | ||
>((props, ref) => { | ||
const { className, ...passThrough } = props; | ||
return ( | ||
<IconBase | ||
{...passThrough} | ||
ref={ref} | ||
viewBox="0 0 24 24" | ||
className={className} | ||
> | ||
<path d="M0 4.88648C0 2.67734 1.79086 0.886475 4 0.886475H20L32 12.8865V36.8865C32 39.0956 30.2091 40.8865 28 40.8865H4C1.79086 40.8865 0 39.0956 0 36.8865V4.88648Z" fill="#1D2433" /> | ||
<path opacity="0.3" d="M20 0.886475L32 12.8865H24C21.7909 12.8865 20 11.0956 20 8.88647V0.886475Z" fill="white" /> | ||
</IconBase> | ||
); | ||
}); | ||
TXTFile.displayName = "IconTXTFile"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thewbuk We don't use this kind of props to input access token and enabledQuery now. We can use the state in the useInstillStore. Please take a look at how we make it in other pages