Skip to content

Commit

Permalink
Merge branch 'main' into nico/improvements_agent_screen
Browse files Browse the repository at this point in the history
  • Loading branch information
nicarq committed Jan 4, 2025
2 parents dd27edb + 785d70a commit 09b8536
Show file tree
Hide file tree
Showing 129 changed files with 1,747 additions and 2,997 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pr-ci-healchecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ jobs:
env:
OPEN_AI_API_KEY: ${{ secrets.OPEN_AI_API_KEY }}
run: |
npx nx run-many -t lint,build,test --parallel=3 --skip-nx-cache --verbose --exclude=shinkai-desktop
npx nx run-many -t lint,test --parallel=3 --skip-nx-cache --verbose --exclude=shinkai-desktop,shinkai-visor
npx nx run-many -t build --parallel=3 --skip-nx-cache --verbose --exclude=shinkai-desktop,shinkai-visor
npx nx lint shinkai-desktop
# - name: Run E2E for Visor
Expand Down
100 changes: 50 additions & 50 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,56 +25,56 @@ jobs:
id: package-version
uses: Saionaro/[email protected]

release-shinkai-visor:
needs: prebuild
runs-on: ubuntu-latest
environment: development
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node version
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
check-latest: false
cache: "npm"
cache-dependency-path: package-lock.json

- name: Install dependencies
run: |
npm cache verify
npm ci --no-audit --prefer-offline
- name: Run NX build on shinkai-visor
run: npx nx build shinkai-visor --skip-nx-cache
env:
VERSION: ${{ needs.prebuild.outputs.version }}.${{github.run_number}}
NAME_PREFIX: '[Dev]'
DESCRIPTION_PREFIX: '[Dev]'

- name: Zip extension
run: cd ./dist/apps && zip -r shinkai-visor.zip shinkai-visor

- name: Upload & Release
uses: mnao305/[email protected]
continue-on-error: true
with:
file-path: dist/apps/shinkai-visor.zip
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
publish: false

- uses: actions/upload-artifact@v3
with:
name: shinkai-visor
path: dist/apps/shinkai-visor
if-no-files-found: error
retention-days: 5
# release-shinkai-visor:
# needs: prebuild
# runs-on: ubuntu-latest
# environment: development
# steps:
# - name: Check out repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0

# - name: Setup Node version
# uses: actions/setup-node@v4
# with:
# node-version-file: '.nvmrc'
# check-latest: false
# cache: "npm"
# cache-dependency-path: package-lock.json

# - name: Install dependencies
# run: |
# npm cache verify
# npm ci --no-audit --prefer-offline

# - name: Run NX build on shinkai-visor
# run: npx nx build shinkai-visor --skip-nx-cache
# env:
# VERSION: ${{ needs.prebuild.outputs.version }}.${{github.run_number}}
# NAME_PREFIX: '[Dev]'
# DESCRIPTION_PREFIX: '[Dev]'

# - name: Zip extension
# run: cd ./dist/apps && zip -r shinkai-visor.zip shinkai-visor

# - name: Upload & Release
# uses: mnao305/[email protected]
# continue-on-error: true
# with:
# file-path: dist/apps/shinkai-visor.zip
# extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
# client-id: ${{ secrets.CHROME_CLIENT_ID }}
# client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
# refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
# publish: false

# - uses: actions/upload-artifact@v3
# with:
# name: shinkai-visor
# path: dist/apps/shinkai-visor
# if-no-files-found: error
# retention-days: 5

release-shinkai-desktop:
needs: prebuild
Expand Down
170 changes: 85 additions & 85 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,49 +31,49 @@ jobs:
script: |
core.setFailed('Version mismatch')
release-shinkai-visor:
needs: prebuild
runs-on: ubuntu-latest
environment: production
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node version
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
check-latest: false
cache: "npm"
cache-dependency-path: package-lock.json

- name: Install dependencies
run: |
npm cache verify
npm ci --no-audit --prefer-offline
- name: Run NX build on shinkai-visor
run: npx nx build shinkai-visor --skip-nx-cache
env:
VERSION: ${{ needs.prebuild.outputs.version }}.${{github.run_number}}
NAME_PREFIX: ''
DESCRIPTION_PREFIX: ''
PUBLIC_KEY: ${{ secrets.CHROME_EXTENSION_PUBLIC_KEY }}

- name: Zip extension
run: cd ./dist/apps && zip -r shinkai-visor.zip shinkai-visor

- name: Upload & Release
uses: mnao305/[email protected]
with:
file-path: dist/apps/shinkai-visor.zip
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
publish: false
# release-shinkai-visor:
# needs: prebuild
# runs-on: ubuntu-latest
# environment: production
# steps:
# - name: Check out repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0

# - name: Setup Node version
# uses: actions/setup-node@v4
# with:
# node-version-file: '.nvmrc'
# check-latest: false
# cache: "npm"
# cache-dependency-path: package-lock.json

# - name: Install dependencies
# run: |
# npm cache verify
# npm ci --no-audit --prefer-offline

# - name: Run NX build on shinkai-visor
# run: npx nx build shinkai-visor --skip-nx-cache
# env:
# VERSION: ${{ needs.prebuild.outputs.version }}.${{github.run_number}}
# NAME_PREFIX: ''
# DESCRIPTION_PREFIX: ''
# PUBLIC_KEY: ${{ secrets.CHROME_EXTENSION_PUBLIC_KEY }}

# - name: Zip extension
# run: cd ./dist/apps && zip -r shinkai-visor.zip shinkai-visor

# - name: Upload & Release
# uses: mnao305/[email protected]
# with:
# file-path: dist/apps/shinkai-visor.zip
# extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
# client-id: ${{ secrets.CHROME_CLIENT_ID }}
# client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
# refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
# publish: false

release-shinkai-desktop:
needs: prebuild
Expand Down Expand Up @@ -380,45 +380,45 @@ jobs:
}
]
}
- name: Post Shinkai Visor to a Slack channel
uses: slackapi/[email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: 'C072VJ6E7GC'
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "📦 New build: Shinkai Visor v${{ needs.prebuild.outputs.version }}.${{ github.run_number }}",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Found it at <https://chromewebstore.google.com/detail/shinkai-visor-supercharge/${{ secrets.CHROME_EXTENSION_ID }}|Chrome Web Store>"
}
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "_💡 Send it for review and publish on <https://chrome.google.com/u/4/webstore/devconsole/f35b7411-6fce-4a2b-8865-c310ce95c89f/${{ secrets.CHROME_EXTENSION_ID }}/edit|Chrome Web Store Developer> to start the rollout_"
}
]
}
]
}
# - name: Post Shinkai Visor to a Slack channel
# uses: slackapi/[email protected]
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# with:
# channel-id: 'C072VJ6E7GC'
# payload: |
# {
# "blocks": [
# {
# "type": "header",
# "text": {
# "type": "plain_text",
# "text": "📦 New build: Shinkai Visor v${{ needs.prebuild.outputs.version }}.${{ github.run_number }}",
# "emoji": true
# }
# },
# {
# "type": "divider"
# },
# {
# "type": "section",
# "text": {
# "type": "mrkdwn",
# "text": "Found it at <https://chromewebstore.google.com/detail/shinkai-visor-supercharge/${{ secrets.CHROME_EXTENSION_ID }}|Chrome Web Store>"
# }
# },
# {
# "type": "divider"
# },
# {
# "type": "context",
# "elements": [
# {
# "type": "mrkdwn",
# "text": "_💡 Send it for review and publish on <https://chrome.google.com/u/4/webstore/devconsole/f35b7411-6fce-4a2b-8865-c310ce95c89f/${{ secrets.CHROME_EXTENSION_ID }}/edit|Chrome Web Store Developer> to start the rollout_"
# }
# ]
# }

# ]
# }
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { cn } from '@shinkai_network/shinkai-ui/utils';
import { Paperclip } from 'lucide-react';
import * as React from 'react';

import { allowedFileExtensions } from '../../../lib/constants';
import { actionButtonClassnames } from '../conversation-footer';

type FileUploadInputProps = {
Expand Down Expand Up @@ -38,7 +37,7 @@ export function FileSelectionActionBar({
<TooltipPortal>
<TooltipContent align="center" side="top">
{t('common.uploadFile')} <br />
{allowedFileExtensions.join(', ')}
{t('common.uploadAFileDescription')}
</TooltipContent>
</TooltipPortal>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
VectorFSFolderScopeEntry,
VectorFSItemScopeEntry,
} from '@shinkai_network/shinkai-message-ts/models/SchemaTypes';
import { ShinkaiPath } from '@shinkai_network/shinkai-message-ts/api/jobs/types';
import { TreeCheckboxSelectionKeys } from 'primereact/tree';
import React, { createContext, useContext, useState } from 'react';
import { createStore, useStore } from 'zustand';
Expand All @@ -16,8 +13,8 @@ type SetJobScopeStore = {
setSetJobScopeOpen: (isSetJobScopeOpen: boolean) => void;
selectedKeys: TreeCheckboxSelectionKeys | null;
onSelectedKeysChange: (value: TreeCheckboxSelectionKeys | null) => void;
selectedFileKeysRef: Map<string, VectorFSItemScopeEntry>;
selectedFolderKeysRef: Map<string, VectorFSFolderScopeEntry>;
selectedFileKeysRef: Map<string, ShinkaiPath>;
selectedFolderKeysRef: Map<string, ShinkaiPath>;

isKnowledgeSearchOpen: boolean;
setKnowledgeSearchOpen: (isKnowledgeSearchOpen: boolean) => void;
Expand All @@ -35,8 +32,8 @@ const createVectorFsStore = () =>
onSelectedKeysChange: (selectedKeys) => {
set({ selectedKeys });
},
selectedFileKeysRef: new Map(),
selectedFolderKeysRef: new Map(),
selectedFileKeysRef: new Map<string, ShinkaiPath>(),
selectedFolderKeysRef: new Map<string, ShinkaiPath>(),

isKnowledgeSearchOpen: false,
setKnowledgeSearchOpen: (isKnowledgeSearchOpen) => {
Expand All @@ -46,8 +43,8 @@ const createVectorFsStore = () =>
set({
isSetJobScopeOpen: false,
selectedKeys: null,
selectedFileKeysRef: new Map(),
selectedFolderKeysRef: new Map(),
selectedFileKeysRef: new Map<string, ShinkaiPath>(),
selectedFolderKeysRef: new Map<string, ShinkaiPath>(),
isKnowledgeSearchOpen: false,
});
},
Expand Down
Loading

0 comments on commit 09b8536

Please sign in to comment.