Skip to content

Commit

Permalink
add an exception to display Snowflake tables in viewType documents
Browse files Browse the repository at this point in the history
  • Loading branch information
aubin-tchoi committed Jan 31, 2025
1 parent a8a7b6a commit 884c5da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion front/lib/api/data_source_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
Err,
isDevelopment,
isDustWorkspace,
MIME_TYPES,
Ok,
removeNulls,
} from "@dust-tt/types";
Expand Down Expand Up @@ -183,7 +184,11 @@ function filterNodesByViewType(
switch (viewType) {
case "documents":
return nodes.filter(
(node) => node.children_count > 0 || node.node_type !== "Table"
(node) =>
node.children_count > 0 ||
node.node_type !== "Table" ||
// TODO: replace this with either an "all" viewType or a DEFAULT_VIEWTYPE_BY_CONNECTOR_PROVIDER
node.mime_type === MIME_TYPES.SNOWFLAKE.TABLE
);
case "tables":
return nodes.filter(
Expand Down

0 comments on commit 884c5da

Please sign in to comment.