Repository navigation
feat(coderd): add chat project instructions storage and prompt injection #30367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0408ba5
00f6b4b
7ccb1ec
1f0b373
08a1a50
49e7232
0df0c77
4dec64b
85e49e3
980f871
679cd04
df4d197
37761d8
c6be116
3721834
35dcf5e
433e8ad
92413eb
f6ee5b4
40b82ba
1ad6a2f
580f015
0a97292
4fdadfe
b19f1b4
846302f
e1b84e9
a0f8003
ef0433b
edcc130
c15aecd
09f6ed5
e1fee63
98bdf43
dd92240
28596e5
945764c
18b498f
744bf73
c59a8fd
79a6828
dfab333
5c91a54
a2d8b8a
a8675a8
3e236c3
137cad4
f5e3425
d9ac776
849f141
a45efbe
4411fad
265fd6a
39b5db0
e9e4e27
0b505e7
dc1ffc3
8381bc2
c71a252
d7e10fa
bef1cb0
abef3b5
9466c80
5a62e32
b2ad6fe
04aa342
3ff622b
9a339fa
96c4b20
5580307
b7aea00
c401672
bb1074c
f6d4fcf
5aca60a
ba9192d
8d93462
982df84
2676905
2806a30
27304bf
274d32e
da20145
80dcc21
a2e2c19
efd681d
4df0f3c
57b41cb
a6ae108
eaff16f
c4ba1f1
f9fa616
52c0723
97fa7ef
4816414
cf95e31
c19a4a1
c79310f
db26d61
0f253c2
a6f1917
72f89d4
9672229
f541e32
d63e9ec
bff6989
c190634
faf265e
ef45c76
dff9afa
5af7410
3918d65
8c38fbd
a9a2c2e
26e9db3
11055e7
2f67dd4
11a3e89
40882af
4027761
658f037
7edc56e
3167d82
80a40ab
5a7e641
fc09059
d9082fd
2bc038d
b8bb0bc
f9b5713
d78d749
74bd4be
cc762d2
c69403e
9d6abe4
d33057d
eb24d35
b2e7ea8
e432821
30fd661
08331ce
971652d
4d5db6e
9c1172d
b5292db
fdfeb9b
13ae0d1
f3306a0
e140387
e9e05ab
4188f73
240d1da
b684e19
1a7ded0
e2a8992
34fa0bb
6262377
1912834
2f65531
c2f62bf
04e6fe1
c6ccbdd
59355bb
06acca3
5cf470c
e7026e0
8602903
8fa8a8b
7cd6f0a
8da1221
8b97aea
ded2c25
b9f3f88
7ce0c42
e4a2471
2e11030
eb8a483
ec5e340
6dfc393
36f5561
6e06900
2b8ccac
aae451f
9c56cc5
1277fc4
5e7b2c8
3ce5b05
f6aeda2
ee1a3a4
efcdb42
bbfb879
e456352
a288a4b
fc94cc8
eccc017
5b2b6e5
95b22b6
ef2bf08
3234831
59ead19
afa0d7d
ee19de5
21a2831
8419966
9f967c2
f17cac8
915fe2b
d6fc9b0
5c35c0a
b184f52
fa9d811
46fff11
6690ae5
adba332
70fdc62
40a768e
f51614c
5ea37c0
807cde0
5340351
8a54253
e3e118e
f81af79
9b634dc
a4518ed
e147257
883ac7c
555a158
b7cfcbf
f621f93
456d2d5
04b3d1a
86b0484
412dcb3
f76351c
c6dd81c
1bd2b78
4f68dfe
7daea55
de057a1
7db14d4
b4ea537
1159d13
8144356
08b1010
7ecde4d
70e457f
816e6bc
ef8a2a9
7ed37fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| DROP TABLE chat_project_instructions; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| CREATE TABLE chat_project_instructions ( | ||
| project_id uuid PRIMARY KEY REFERENCES chat_projects(id) ON DELETE CASCADE, | ||
| organization_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE, | ||
| instructions text NOT NULL, | ||
| updated_by uuid REFERENCES users(id) ON DELETE SET NULL, | ||
| created_at timestamptz NOT NULL DEFAULT now(), | ||
| updated_at timestamptz NOT NULL DEFAULT now(), | ||
| CONSTRAINT chat_project_instructions_not_blank CHECK (length(btrim(instructions)) > 0) | ||
| ); | ||
|
|
||
| COMMENT ON TABLE chat_project_instructions IS 'Per-project instructions injected into the system prompt of every chat in the project, for every user. A project without a row has no instructions.'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| INSERT INTO chat_project_instructions (project_id, organization_id, instructions, updated_by) | ||
| VALUES ( | ||
| '59400000-0000-4000-8000-000000000001', | ||
| 'bb640d07-ca8a-4869-b6bc-ae61ebb2fda1', | ||
| 'Fixture project instructions.', | ||
| '0ed9befc-4911-4ccf-a8e2-559bf72daa94' | ||
| ); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.