chore: add facades refactor: core module export refactor: inference plugin - deprecate function registering (#537) * refactor: revamp inference plugin as class - deprecate function registering * refactor: monitoring plugin - deprecate service registering (#538) refactor: revamp inference plugin as class - deprecate function registering chore: update import refactor: plugin revamp - model management chore: update build steps and remove experimental plugins refactor: remove pluggable electron chore: add sorting for conversations chore: build plugins for testing chore: consistent plugin directory name chore: docs chore: fix CI chore: update conversation prefix
35 lines
935 B
TypeScript
35 lines
935 B
TypeScript
import React from 'react'
|
|
import ModelRow from '../ModelRow'
|
|
import ModelTableHeader from '../ModelTableHeader'
|
|
import { Model } from '@janhq/core/lib/types'
|
|
|
|
type Props = {
|
|
models: Model[]
|
|
}
|
|
|
|
const tableHeaders = ['MODEL', 'FORMAT', 'SIZE', 'STATUS', 'ACTIONS']
|
|
|
|
const ModelTable: React.FC<Props> = ({ models }) => (
|
|
<>
|
|
<div className="overflow-hidden rounded-lg border border-border align-middle shadow-lg">
|
|
<table className="min-w-full">
|
|
<thead className="bg-background">
|
|
<tr className="rounded-t-lg">
|
|
{tableHeaders.map((item) => (
|
|
<ModelTableHeader key={item} title={item} />
|
|
))}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{models?.map((model) => (
|
|
<ModelRow key={model._id} model={model} />
|
|
))}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div className="relative"></div>
|
|
</>
|
|
)
|
|
|
|
export default React.memo(ModelTable)
|