Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-01-24 23:49:20 +07:00 committed by GitHub
parent 8a5b84802c
commit e8d5739847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 29 deletions

View File

@ -20,13 +20,14 @@
import { toIntl } from '..'
import ContentPopup from './ContentPopup.svelte'
let txes: (TxCUD<Doc> & { index: number })[] = []
type TxCUDIndex = TxCUD<Doc> & { index: number }
let txes: TxCUDIndex[] = []
const activityQuery = createQuery()
$: activityQuery.query(core.class.TxCUD, { objectSpace: core.space.Model }, (result) => {
$: activityQuery.query<TxCUD<Doc>>(core.class.TxCUD, { objectSpace: core.space.Model }, (result) => {
let c = 0
txes = result.map((t) => ({ ...t, index: c++ }))
txes = result.map((t) => ({ ...t, index: c++ } as TxCUDIndex))
})
</script>

View File

@ -68,9 +68,8 @@
const teamQuery = createQuery()
let _teams: Map<Ref<Team>, Team> | undefined = undefined
let _result: any
$: teamQuery.query(tracker.class.Team, {}, (result) => {
_result = JSON.stringify(result, undefined, 2)
_teams = toIdMap(result)
})

View File

@ -19,7 +19,7 @@
import { Issue, Project } from '@hcengineering/tracker'
import { CheckBox, Spinner, Timeline, TimelineRow } from '@hcengineering/ui'
import { AttributeModel, BuildModelKey } from '@hcengineering/view'
import { buildModel, getObjectPresenter, LoadingProps } from '@hcengineering/view-resources'
import { buildModel, LoadingProps } from '@hcengineering/view-resources'
import { createEventDispatcher } from 'svelte'
import tracker from '../../plugin'
import ProjectPresenter from './ProjectPresenter.svelte'
@ -42,8 +42,6 @@
}
}
let personPresenter: AttributeModel
$: options = { ...baseOptions } as FindOptions<Project>
$: selectedObjectIdsSet = new Set<Ref<Doc>>(selectedObjectIds.map((it) => it._id))
let selectedRows: number[] = []
@ -56,10 +54,6 @@
selectedRows = tRows
} else selectedRows = []
$: getObjectPresenter(client, contact.class.Person, { key: '' }).then((p) => {
personPresenter = p
})
export const onObjectChecked = (docs: Doc[], value: boolean) => {
dispatch('check', { docs, value })
}
@ -174,20 +168,20 @@
{/if}
<style lang="scss">
.timeline-container {
overflow: hidden;
position: relative;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
min-width: 0;
min-height: 0;
// .timeline-container {
// overflow: hidden;
// position: relative;
// display: flex;
// flex-direction: column;
// width: 100%;
// height: 100%;
// min-width: 0;
// min-height: 0;
& > * {
overscroll-behavior-x: contain;
}
}
// & > * {
// overscroll-behavior-x: contain;
// }
// }
.timeline-header {
display: flex;
align-items: center;

View File

@ -47,7 +47,7 @@ import openaiPlugin, { openAIRatelimitter } from './plugin'
/**
* @public
*/
export const openAIstage = 'emb-v3'
export const openAIstage = 'emb-v3a'
/**
* @public
@ -78,7 +78,7 @@ export class OpenAIEmbeddingsStage implements FullTextPipelineStage {
summary_field = 'summary'
enabled = true
enabled = false
clearExcept?: string[] = undefined
updateFields: DocUpdateHandler[] = []

View File

@ -162,7 +162,7 @@ export async function OnGPTRequest (tx: Tx, tc: TriggerControl): Promise<Tx[]> {
for (const choices of response.choices) {
const msgTx = tc.txFactory.createTxCreateDoc(chunter.class.Comment, tx.objectSpace, {
message: 'gpt Answer:\n<br/>' + (choices.text as string),
message: 'gpt Answer:\n<br/>' + (choices.text as string).replace('\n', '\n<br/>'),
attachedTo: parentTx.objectId,
attachedToClass: parentTx.objectClass,
collection: parentTx.collection

View File

@ -36,7 +36,7 @@ import { convert } from 'html-to-text'
/**
* @public
*/
export const summaryStageId = 'sum-v1_1'
export const summaryStageId = 'sum-v2'
/**
* @public