Skip to content

Commit c2c6bc2

Browse files
committed
feat: langchainjs/langgraphjs tool-call/output
0 parents  commit c2c6bc2

File tree

79 files changed

+17201
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+17201
-0
lines changed

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
15+
[makefile]
16+
indent_size = 2
17+
indent_style = space
18+
19+
[*.sh]
20+
indent_size = 2
21+
indent_style = space

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
build
4+
.next

.eslintrc.cjs

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
node: true,
6+
es6: true,
7+
jest: true,
8+
},
9+
parser: '@typescript-eslint/parser',
10+
parserOptions: {
11+
ecmaFeatures: {
12+
jsx: true,
13+
impliedStrict: true,
14+
},
15+
ecmaVersion: 2020,
16+
sourceType: 'module',
17+
},
18+
settings: {
19+
react: {
20+
version: 'detect',
21+
},
22+
},
23+
globals: {
24+
Atomics: 'readonly',
25+
SharedArrayBuffer: 'readonly',
26+
},
27+
plugins: ['react', 'react-hooks', '@typescript-eslint'],
28+
// ESLint extends configurations recursively
29+
extends: [
30+
'plugin:react/recommended',
31+
'plugin:react-hooks/recommended',
32+
'plugin:@typescript-eslint/recommended',
33+
],
34+
// 自定义规则,可以覆盖掉extends的配置,0-off,1-warn,2-error
35+
rules: {
36+
'no-param-reassign': 1,
37+
'no-invalid-this': 0,
38+
'no-unused-vars': 0,
39+
'no-empty': 1,
40+
'no-var': 1,
41+
'no-return-assign': 1,
42+
'no-inner-declarations': 1,
43+
'no-promise-executor-return': 1,
44+
'no-eq-null': 1,
45+
eqeqeq: 1,
46+
'one-var': 0,
47+
'guard-for-in': 1,
48+
complexity: 1,
49+
'prefer-const': 1,
50+
'prefer-spread': 1,
51+
'prefer-rest-params': 1,
52+
'prefer-object-spread': 1,
53+
'prefer-arrow-callback': 0,
54+
'prefer-promise-reject-errors': 1,
55+
'prefer-regex-literals': 0,
56+
radix: 1,
57+
'max-nested-callbacks': 1,
58+
'max-params': 1,
59+
'accessor-pairs': 0,
60+
'import/order': 0,
61+
'react/no-find-dom-node': 1,
62+
'react/no-deprecated': 1,
63+
'react/no-did-update-set-state': 1,
64+
'react/no-unescaped-entities': 1,
65+
'react/jsx-no-constructed-context-values': 1,
66+
'react/prop-types': 0,
67+
'react/display-name': 0,
68+
'react/prefer-es6-class': 0,
69+
'react/sort-comp': 0,
70+
'react/react-in-jsx-scope': 0,
71+
'react/jsx-no-useless-fragment': 1,
72+
'react/jsx-key': 1,
73+
'react/jsx-uses-react': 0,
74+
'react/jsx-fragments': 0,
75+
'react/jsx-curly-brace-presence': 1,
76+
'react-hooks/rules-of-hooks': 2,
77+
'react-hooks/exhaustive-deps': 1,
78+
'react/self-closing-comp': 1,
79+
'@typescript-eslint/no-explicit-any': 0,
80+
'@typescript-eslint/no-unused-vars': 0,
81+
'@typescript-eslint/no-empty-interface': 0,
82+
'@typescript-eslint/no-empty-function': 0,
83+
'@typescript-eslint/no-non-null-assertion': 0,
84+
'@typescript-eslint/no-invalid-this': 0,
85+
'@typescript-eslint/no-var-requires': 1,
86+
'@typescript-eslint/no-require-imports': 1,
87+
'@typescript-eslint/no-invalid-void-type': 1,
88+
'@typescript-eslint/no-inferrable-types': 0,
89+
'@typescript-eslint/ban-types': 1,
90+
'@typescript-eslint/prefer-for-of': 0,
91+
'@typescript-eslint/prefer-optional-chain': 0,
92+
'@typescript-eslint/prefer-function-type': 0,
93+
'@typescript-eslint/consistent-type-assertions': 0,
94+
'@typescript-eslint/method-signature-style': 0,
95+
'@typescript-eslint/explicit-function-return-type': 0,
96+
'@typescript-eslint/explicit-member-accessibility': 0,
97+
'@typescript-eslint/member-ordering': 0,
98+
'@typescript-eslint/consistent-type-definitions': 0,
99+
'@typescript-eslint/class-literal-property-style': 0,
100+
'@typescript-eslint/explicit-module-boundary-types': 0,
101+
},
102+
};
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# # Sample workflow for building and deploying a react site to GitHub Pages
2+
# name: Deploy React to GitHub Pages
3+
4+
# on:
5+
# # Runs on pushes targeting the default branch
6+
# push:
7+
# # branches: [$default-branch] not work
8+
# branches: [ 'main' ]
9+
# # Allows you to run this workflow manually from the Actions tab
10+
# workflow_dispatch:
11+
12+
# # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
# permissions:
14+
# contents: read
15+
# pages: write
16+
# id-token: write
17+
18+
# # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
# concurrency:
21+
# group: "pages"
22+
# cancel-in-progress: false
23+
24+
# jobs:
25+
# # Build job
26+
# build:
27+
# runs-on: ubuntu-22.04
28+
# steps:
29+
# - name: Checkout
30+
# uses: actions/checkout@v4
31+
# - name: Detect package manager
32+
# id: detect-package-manager
33+
# run: |
34+
# if [ -f "${{ github.workspace }}/yarn.lock" ]; then
35+
# echo "manager=yarn" >> $GITHUB_OUTPUT
36+
# echo "command=install" >> $GITHUB_OUTPUT
37+
# echo "runner=yarn" >> $GITHUB_OUTPUT
38+
# exit 0
39+
# elif [ -f "${{ github.workspace }}/package.json" ]; then
40+
# echo "manager=npm" >> $GITHUB_OUTPUT
41+
# echo "command=ci" >> $GITHUB_OUTPUT
42+
# echo "runner=npx --no-install" >> $GITHUB_OUTPUT
43+
# exit 0
44+
# else
45+
# echo "Unable to determine package manager"
46+
# exit 1
47+
# fi
48+
# - name: Setup Node
49+
# uses: actions/setup-node@v4
50+
# with:
51+
# node-version: "22"
52+
# cache: ${{ steps.detect-package-manager.outputs.manager }}
53+
# - name: Setup Pages
54+
# uses: actions/configure-pages@v4
55+
# # with:
56+
# # Automatically inject basePath in your Next.js configuration file and disable
57+
# # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
58+
# #
59+
# # You may remove this line if you want to manage the configuration yourself.
60+
# # static_site_generator: next
61+
# - name: Install dependencies
62+
# run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
63+
# - name: Build react
64+
# # run: ${{ steps.detect-package-manager.outputs.runner }} npm run build
65+
# run: npm run build
66+
# - name: Upload artifact
67+
# uses: actions/upload-pages-artifact@v3
68+
# with:
69+
# path: ./build
70+
71+
# # Deployment job
72+
# deploy:
73+
# environment:
74+
# name: github-pages
75+
# url: ${{ steps.deployment.outputs.page_url }}
76+
# runs-on: ubuntu-22.04
77+
# needs: build
78+
# steps:
79+
# - name: Deploy to GitHub Pages
80+
# id: deployment
81+
# uses: actions/deploy-pages@v4

.gitignore

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# intermediate files
2+
node_modules/
3+
# package-lock.json
4+
# yarn.lock
5+
# pnpm-lock.yaml
6+
7+
build/
8+
dist/
9+
lib/
10+
11+
target/
12+
build/
13+
out/
14+
tomcat.**
15+
16+
*.log
17+
18+
# hidden files
19+
bak/
20+
-bak/
21+
sample-**/
22+
bookmarks.json
23+
# repos/
24+
repos-caches/
25+
26+
.env.local
27+
.env.test
28+
.env.private
29+
.bak
30+
.bak.**
31+
32+
# auto-generated files
33+
.idea/
34+
*.iml
35+
.settings/
36+
.classpath
37+
.project
38+
.factorypath
39+
.DS_Store
40+
41+
# below Created by https://www.gitignore.io/api/node
42+
43+
### Node ###
44+
# Logs
45+
logs
46+
*.log
47+
npm-debug.log*
48+
yarn-debug.log*
49+
yarn-error.log*
50+
51+
# Runtime data
52+
pids
53+
*.pid
54+
*.seed
55+
*.pid.lock
56+
57+
# Directory for instrumented libs generated by jscoverage/JSCover
58+
lib-cov
59+
60+
# Coverage directory used by tools like istanbul
61+
coverage
62+
63+
# nyc test coverage
64+
.nyc_output
65+
66+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
67+
.grunt
68+
69+
# Bower dependency directory (https://bower.io/)
70+
bower_components
71+
72+
# node-waf configuration
73+
.lock-wscript
74+
75+
# Compiled binary addons (http://nodejs.org/api/addons.html)
76+
build/Release
77+
78+
# Dependency directories
79+
node_modules/
80+
jspm_packages/
81+
82+
# Typescript v1 declaration files
83+
typings/
84+
85+
# Optional npm cache directory
86+
.npm
87+
88+
# Optional eslint cache
89+
.eslintcache
90+
91+
# Optional REPL history
92+
.node_repl_history
93+
94+
# Output of 'npm pack'
95+
*.tgz
96+
97+
# Yarn Integrity file
98+
.yarn-integrity
99+
100+
# dotenv environment variables file
101+
.env
102+
103+
# End of https://www.gitignore.io/api/node
104+
105+
lib/
106+
107+
*.tsbuildinfo

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npm run lint
2+
npm run format

.prettierignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ignore files for prettier
2+
3+
LICENSE.txt
4+
5+
node_modules/
6+
7+
*.md
8+
*.mdx
9+
10+
*.min.js
11+
*.min.css
12+
*.js.map
13+
*.css.map
14+
15+
*.svg
16+
17+
build/
18+
dist/
19+
20+
# docs/
21+
# lib/

.prettierrc.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/** @type {import("prettier").Config} */
2+
const prettierConfig = {
3+
printWidth: 80,
4+
tabWidth: 2,
5+
useTabs: false,
6+
semi: true,
7+
singleQuote: true,
8+
quoteProps: 'as-needed',
9+
jsxSingleQuote: true,
10+
trailingComma: 'all',
11+
bracketSpacing: true,
12+
bracketSameLine: false,
13+
arrowParens: 'always',
14+
// Line Feed only (\n), common on Linux and macOS as well as inside git repos
15+
endOfLine: 'lf',
16+
// Prettier automatically infers the parser from the input file path
17+
// parser: 'typescript',
18+
};
19+
20+
export default prettierConfig;

.vscode/extensions.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"esbenp.prettier-vscode",
4+
"mervin.markdown-formatter",
5+
"aaron-bond.better-comments",
6+
"streetsidesoftware.code-spell-checker",
7+
"alefragnani.bookmarks",
8+
"dozerg.tsimportsorter"
9+
]
10+
}

0 commit comments

Comments
 (0)