mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: exclude ai columns (#5526)
This commit is contained in:
@ -495,6 +495,10 @@ impl FieldType {
|
||||
s.to_string()
|
||||
}
|
||||
|
||||
pub fn is_ai_field(&self) -> bool {
|
||||
matches!(self, FieldType::Summary | FieldType::Translate)
|
||||
}
|
||||
|
||||
pub fn is_number(&self) -> bool {
|
||||
matches!(self, FieldType::Number)
|
||||
}
|
||||
|
@ -435,8 +435,7 @@ impl DatabaseManager {
|
||||
// When summarizing a row, skip the content in the "AI summary" cell; it does not need to
|
||||
// be summarized.
|
||||
if field.id != field_id {
|
||||
// Don't summarize the summary field.
|
||||
if field.field_type == FieldType::Summary as i64 {
|
||||
if FieldType::from(field.field_type).is_ai_field() {
|
||||
continue;
|
||||
}
|
||||
if let Some(cell) = row.cells.get(&field.id) {
|
||||
@ -482,8 +481,7 @@ impl DatabaseManager {
|
||||
// When translate a row, skip the content in the "AI Translate" cell; it does not need to
|
||||
// be translated.
|
||||
if field.id != field_id {
|
||||
// Don't translate the translate field.
|
||||
if field.field_type == FieldType::Translate as i64 {
|
||||
if FieldType::from(field.field_type).is_ai_field() {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user