WEBVTT
NOTE Generated by scripts/generate-bilingual-video-tracks.mjs from codex-1XkVsE9-ZK4.en.vtt and codex-1XkVsE9-ZK4.zh-Hans.vtt.

1
00:00:00.020 --> 00:00:03.280
It's really important for us that Codex works anywhere you like to code.
对我们来说，Codex 能在你喜欢写代码的任何地方工作非常重要。

2
00:00:03.600 --> 00:00:05.760
For many of you, that place is your JetBrains IDE.
对你们很多人来说，那个地方就是 JetBrains IDE。

3
00:00:06.420 --> 00:00:10.700
So we're super excited to announce that one of our most requested features is finally here.
所以我们非常高兴地宣布，大家呼声最高的功能之一终于来了。

4
00:00:11.140 --> 00:00:12.700
Codex now works in JetBrains.
Codex 现在可以在 JetBrains 中使用了。

5
00:00:13.140 --> 00:00:16.960
You can now collaborate with Codex directly within JetBrains IDEs
你现在可以直接在 JetBrains IDE 中与 Codex 协作，

6
00:00:17.480 --> 00:00:21.940
using your ChatGPT subscription, API key, or your JetBrains AI subscription.
使用你的 ChatGPT 订阅、API key，或者 JetBrains AI 订阅。

7
00:00:22.340 --> 00:00:24.240
And with me, I got Gleb from JetBrains,
今天和我一起的是来自 JetBrains 的 Gleb，

8
00:00:24.380 --> 00:00:27.060
who's going to give us a quick tour of Codex in JetBrains.
他会快速带我们看看 JetBrains 中的 Codex。

9
00:00:27.380 --> 00:00:30.600
We know developers use our products on complex problems.
我们知道，开发者会用我们的产品处理复杂问题。

10
00:00:31.090 --> 00:00:34.440
And that's where JetBrains and Codex really shine.
而这正是 JetBrains 和 Codex 真正大放异彩的地方。

11
00:00:34.880 --> 00:00:38.400
So I wanted to show you Codex's work on real projects inside my IDE.
所以我想在我的 IDE 里，用真实项目展示 Codex 的工作方式。

12
00:00:39.120 --> 00:00:42.040
It's a multi-platform Kotlin codebase for our conference.
这是我们会议用的一个多平台 Kotlin 代码库。

13
00:00:42.700 --> 00:00:45.400
It runs on mobile, web, and even desktop.
它可以运行在移动端、Web，甚至桌面端。

14
00:00:45.960 --> 00:00:49.260
I'll show you how Codex helps with debugging and feature implementation
我会展示 Codex 如何帮助调试和实现功能，

15
00:00:49.920 --> 00:00:52.000
on that scale right within your IDE.
并且是在这样的规模下，直接在你的 IDE 里完成。

16
00:00:53.040 --> 00:01:01.120
So let's start probably with the fact that you don't need to use JetBrains AI subscription to log into Codex.
我们先从这点开始：你不需要使用 JetBrains AI 订阅来登录 Codex。

17
00:01:01.760 --> 00:01:09.100
You can use your ChatGPT account to log in or add the API key to do that.
你可以用 ChatGPT 账号登录，也可以添加 API key 来登录。

18
00:01:09.460 --> 00:01:15.780
So I'm going to log in in my Codex account, which is already done.
我现在登录我的 Codex 账号，已经完成了。

19
00:01:16.380 --> 00:01:21.480
And then I want to, first of all, ask what this project is about, totally.
然后我首先想问一下，这个项目到底是做什么的。

20
00:01:21.700 --> 00:01:22.380
Totally, it makes sense.
完全可以，这很合理。

21
00:01:22.720 --> 00:01:28.140
Good way to start. So we can see Codex beginning to look at different files,
这是一个很好的开始。我们可以看到 Codex 开始查看不同文件，

22
00:01:28.560 --> 00:01:33.740
reading the file system. Exactly. Yeah. So it collects some context and understanding of what
读取文件系统。没错，是的。它会收集一些上下文，并理解

23
00:01:33.960 --> 00:01:39.020
does the project do. So as you can see, it's our Kotlin Conf app. By the way, you're welcome.
这个项目是做什么的。你可以看到，这是我们的 Kotlin Conf 应用。顺便说一句，也欢迎你来。

24
00:01:41.060 --> 00:01:48.139
And so, yeah, it runs on Android, iOS, desktop, and web using the framework called Compose
所以，是的，它使用 Compose 这个框架运行在 Android、iOS、桌面端和 Web 上，

25
00:01:48.160 --> 00:01:54.340
multi-platform. So I will try to build this project right now to see how it actually looks like on iOS.
也就是 Compose Multiplatform。现在我会尝试构建这个项目，看看它在 iOS 上实际是什么样子。

26
00:01:55.040 --> 00:02:00.100
Cool. So this is compiling it for iOS and then
很好。所以这是在为 iOS 编译，然后

27
00:02:00.230 --> 00:02:07.920
It compiles the project for iOS using Gradle technology. We're using the IntelliJ tools for
它会使用 Gradle 技术为 iOS 编译项目。我们使用 IntelliJ 工具来做

28
00:02:07.970 --> 00:02:13.659
that. But as you can see, there are some errors, right? So, and I will probably need
这件事。但你可以看到，这里有一些错误，对吧？所以我可能需要

29
00:02:13.680 --> 00:02:17.360
to help of Codex to solve that.
Codex 的帮助来解决它。

30
00:02:18.200 --> 00:02:21.660
So what I do is I'm just simply copy and pasting everything
我要做的事情很简单，就是把这里读到的所有内容复制粘贴出来，

31
00:02:22.100 --> 00:02:28.020
that is read here and asking Codex to help me solving that.
然后请 Codex 帮我解决它。

32
00:02:29.980 --> 00:02:34.220
So we can now see Codex is jumping through different tasks,
现在我们可以看到 Codex 正在不同任务之间跳转，

33
00:02:34.380 --> 00:02:37.300
looking at the files that might be impacted based
根据堆栈跟踪查看可能受影响的文件。

34
00:02:37.360 --> 00:02:38.320
on the stack trace.
查看堆栈跟踪。

35
00:02:38.700 --> 00:02:39.180
Exactly.
没错。

36
00:02:39.680 --> 00:02:41.860
And you see what exactly Codex does.
你也能看到 Codex 具体在做什么。

37
00:02:42.020 --> 00:02:46.260
So it provides some reasoning on the certain actions that it does.
它会对自己采取的某些操作给出推理说明。

38
00:02:46.960 --> 00:02:49.280
It shows the files that it's read and so on.
它会显示自己读取过的文件等等。

39
00:02:49.560 --> 00:02:55.820
And this is the same Codex that I get when I run Codex CLI or if I use it in a different idea?
这和我运行 Codex CLI，或者在另一个 IDE 里使用时得到的是同一个 Codex 吗？

40
00:02:55.820 --> 00:03:08.280
It is exactly the same Codex just because inside JetBrains we run evaluation to make sure the quality of CLI Codex is exactly the same as the one that users receive inside AI systems.
它就是完全相同的 Codex，因为在 JetBrains 内部我们会做评估，确保 CLI Codex 的质量和用户在 AI 系统中收到的是完全一致的。

41
00:03:08.520 --> 00:03:08.760
Amazing.
太棒了。

42
00:03:09.880 --> 00:03:11.880
And it looks like it did some file changes here.
看起来它在这里做了一些文件修改。

43
00:03:12.000 --> 00:03:12.100
Yeah.
是的。

44
00:03:12.850 --> 00:03:17.140
So actually, we can take a look on the exact changes
实际上，我们可以看看具体的修改内容，

45
00:03:17.550 --> 00:03:20.060
to make sure that they actually make sense.
确认它们确实合理。

46
00:03:21.160 --> 00:03:23.660
You see the Codex has finished its work.
你可以看到 Codex 已经完成了工作。

47
00:03:24.060 --> 00:03:26.920
And we can try to build the project again, right?
然后我们可以再次尝试构建项目，对吧？

48
00:03:28.700 --> 00:03:29.680
Fingers crossed.
祈祷顺利。

49
00:03:30.500 --> 00:03:31.240
See if it builds.
看看能不能构建成功。

50
00:03:32.379 --> 00:03:35.140
These are just warnings, so it's not a problem.
这些只是警告，所以不是问题。

51
00:03:41.320 --> 00:03:42.400
And it builds.
然后它构建成功了。

52
00:03:42.740 --> 00:03:43.140
All right.
好的。

53
00:03:44.120 --> 00:03:44.600
Does it run?
它能运行吗？

54
00:03:45.860 --> 00:03:50.140
Developers usually don't like dealing with the build issues,
开发者通常不喜欢处理构建问题，

55
00:03:50.340 --> 00:03:52.960
and it's quite difficult to understand what exactly is happening
而且很难理解到底发生了什么，

56
00:03:53.420 --> 00:03:55.220
when the project is building.
当项目正在构建的时候。

57
00:03:55.610 --> 00:03:59.780
So Codex does an amazing job understanding what exactly needs to be done here.
所以 Codex 在理解这里到底需要做什么方面做得非常出色。

58
00:03:59.980 --> 00:04:01.560
Yeah, we didn't really have to give it any guidance.
是的，我们其实并没有给它任何指导。

59
00:04:01.710 --> 00:04:03.940
It just runs around and we figure things out.
它只是自己到处查看，然后把问题弄清楚。

60
00:04:03.940 --> 00:04:08.520
We didn't even need to read through the errors that are here, right?
我们甚至都不需要通读这里的错误，对吧？

61
00:04:09.060 --> 00:04:10.440
So, yeah, the app is working.
所以，是的，应用已经可以运行了。

62
00:04:11.980 --> 00:04:17.220
and now I guess it's time to give Codex a little bit more complex task, right?
现在我想是时候给 Codex 一个稍微更复杂的任务了，对吧？

63
00:04:18.659 --> 00:04:24.320
We know that the biggest problem for all the mobile developers is localization, right?
我们知道，对所有移动开发者来说，最大的问题就是本地化，对吧？

64
00:04:24.720 --> 00:04:27.580
So just because it's quite a mundane, complex task
因为这是一个相当琐碎但复杂的任务，

65
00:04:28.080 --> 00:04:31.480
that does not involve a lot of kind of visual changes,
它不涉及太多视觉层面的变化，

66
00:04:31.840 --> 00:04:33.600
but at the same time it is extremely important.
但同时又极其重要。

67
00:04:35.420 --> 00:04:37.340
Probably the best task to give to an agent.
这大概是最适合交给 agent 的任务。

68
00:04:37.560 --> 00:04:38.040
Sounds great.
听起来很好。

69
00:04:38.220 --> 00:04:40.220
I have a problem that I'm going to base here.
我这里有一个问题，我会把它贴到这里。

70
00:04:40.780 --> 00:04:45.900
and I'm going to ask, create a localization to Spanish
然后我会要求它为我们的会议应用创建西班牙语本地化。

71
00:04:46.520 --> 00:04:49.180
for the conference app that we have.
太好了。我们开始吧。

72
00:04:49.320 --> 00:04:50.400
Awesome. Let's fire it off.
在 Codex 工作的时候，我们仍然可以查看

73
00:04:53.550 --> 00:04:56.280
While Codex is working, we still can oversee
它在看哪些文件，

74
00:04:56.730 --> 00:04:59.600
what kind of files it looks at,
以及它查看这些文件背后的推理。

75
00:05:00.020 --> 00:05:02.680
what kind of reasoning behind looking at these files.
当它运行 bash 命令时，

76
00:05:03.120 --> 00:05:04.820
When it runs the bash commands,
我们可以看到它运行了哪些命令。

77
00:05:05.340 --> 00:05:07.820
we can see what kind of commands it runs.
与此同时，不同开发者对 agent 行为的容忍度是不一样的，对吧？

78
00:05:08.420 --> 00:05:15.000
At the same time, so different developers have different tolerance towards what agent does, right?
这也是我们在集成中考虑到的地方，用户可以为 agent 选择不同类型的访问模式，对吧？

79
00:05:15.260 --> 00:05:27.900
And this is something that we consider inside our integration, where user can select different types of access modes to agent, right?
我们可以限制 agent 不能编辑任何文件。

80
00:05:28.140 --> 00:05:31.960
So we can restrict agent 2 from editing any file.
这样它就只是只读模式，非常适合理解复杂代码库，或者比如用户不知道某个文件在哪里时进行搜索。

81
00:05:32.140 --> 00:05:42.620
So it would be just read-only, extremely suitable for understanding complex code bases, or let's say search when a user just doesn't know where the certain file is located.
Agent 模式允许运行命令，但同时每个命令都需要用户批准，这样一些比较敏感的命令就会经过用户审查。

82
00:05:43.600 --> 00:05:56.220
Agent mode allows to run commands, but at the same time it requires user approval for every command so that some quite sensitive commands would be user-reviewed.
而我现在使用的完全访问模式，实际上允许 agent 运行任何它想运行的命令，除了风险最高的那些，并且可以修改代码文件。

83
00:05:56.700 --> 00:06:08.040
And full access, which I currently have, actually allows agent to run any command they want, apart from the riskiest ones, and change the code files.
太棒了。

84
00:06:08.480 --> 00:06:08.920
Awesome.
然后你可以看到，你能点击它正在查看的实际文件吗？

85
00:06:11.520 --> 00:06:15.940
And then you can see, are you able to click on the actual files that it's checking out?
可以，所以你可以查看这个文件。

86
00:06:16.160 --> 00:06:18.260
Yeah, so you can take a look at the file.
它会在 IDE 中打开，所以你可以查看这个文件里具体写了什么，

87
00:06:18.860 --> 00:06:26.180
So it opens in IDE, so you can take a look at what exactly is written in this file
并且随着修改发生而查看。

88
00:06:26.760 --> 00:06:28.000
as the changes come.
这太棒了。

89
00:06:28.780 --> 00:06:29.140
That's awesome.
我觉得其中一个有意思的地方是，

90
00:06:29.400 --> 00:06:31.060
And I think one of the things that's interesting
看起来 Codex 在做大量研究，

91
00:06:31.240 --> 00:06:33.160
is it looked like Codex was doing a lot of research
跨越整个代码库，

92
00:06:33.410 --> 00:06:34.240
across the code base
所以如果你有一个复杂代码库，

93
00:06:34.420 --> 00:06:36.920
so that if you have a complex code base,
它会先去理解所有上下文，

94
00:06:37.020 --> 00:06:39.220
it's going to go and first understand all the context
因为我们没有给它任何指导，对吧？

95
00:06:39.480 --> 00:06:42.060
because we didn't give it any guidance, right?
我们只是大概说，这是问题。

96
00:06:42.160 --> 00:06:43.760
We just sort of like say, here's the problem.
但现在它似乎已经进入状态，

97
00:06:44.320 --> 00:06:46.000
But now it's sort of like locked in
然后一项接一项地推进代码修改。

98
00:06:46.100 --> 00:06:48.720
and it's just like hammering out code change after code change.
没错，完全没错。

99
00:06:48.820 --> 00:06:49.640
Exactly, exactly.
这就像你把一个开发者安排到任务上，

100
00:06:49.940 --> 00:06:52.200
It's like you put a developer
而这个开发者对这个代码库一无所知。

101
00:06:52.460 --> 00:06:55.880
that does not know a thing about this code base to a task.
所以他们做的第一件事就是研究代码。

102
00:06:56.220 --> 00:06:58.940
So the first thing they do is to research the code.
没错。

103
00:06:59.080 --> 00:06:59.400
That's right.
这里的 agent 正是在模拟这些动作。

104
00:06:59.580 --> 00:07:02.560
So agent here exactly mimics these actions.
做研究时不会修改任何东西，因为它还不了解这个代码库。

105
00:07:03.120 --> 00:07:07.540
Doing the research is not changing anything just because they don't know yet about the codebase.
但一旦研究完成，代码修改就会开始出现。

106
00:07:08.000 --> 00:07:11.460
But so once the research is done, the code changes are coming.
太棒了。

107
00:07:11.840 --> 00:07:12.200
Amazing.
感觉所有东西仍然都在你的 IDE 里面。

108
00:07:12.880 --> 00:07:17.900
It feels like it's like everything is still very much right inside your IDE.
没错。

109
00:07:18.460 --> 00:07:18.660
Exactly.
你不需要改变任何已经习惯的工作方式。

110
00:07:18.940 --> 00:07:21.360
You don't have to change any of your behaviors that you're used to.
它只是一个侧边栏，对吧？

111
00:07:21.740 --> 00:07:24.280
So it's just a sidebar, right?
所以当 agent 工作时，你甚至可以关闭这个标签页，开启一个新对话，询问其他事情。

112
00:07:24.360 --> 00:07:31.780
So while agent is working, you can even close this tab and start a new conversation and asking about something else.
或者你可以继续处理你正在处理的文件。

113
00:07:32.380 --> 00:07:36.600
Or you can continue working on the files that you worked with.
所以 agent 的工作和开发者的工作是并行进行的。

114
00:07:36.780 --> 00:07:42.900
So the work of an agent is paralleled with the work that developer does.
而且它不会干扰开发者。

115
00:07:43.400 --> 00:07:45.300
And it does not intervene with that.
开发者不需要等 agent 完成工作，才能继续自己的工作。

116
00:07:45.300 --> 00:07:50.720
So a developer does not need to wait for agent to finish working to continue their work.
它们可以很优雅地并行共存。

117
00:07:51.140 --> 00:07:53.520
They kind of coexist elegantly and parallel.
现在它正在这里运行一个 shell 命令。

118
00:07:53.580 --> 00:07:55.500
So now it's running a shell command here.
看起来它正在运行 Gradle。

119
00:07:56.140 --> 00:07:57.480
So it looks like it's running Gradle.
它会尝试编译所有内容。

120
00:07:58.120 --> 00:08:00.320
It tries to compile everything.
它尝试编译所有内容。

121
00:08:00.670 --> 00:08:00.800
Yeah.
是的。

122
00:08:01.240 --> 00:08:03.360
And this is like one of the interesting things about Codex.
这也是 Codex 有意思的地方之一。

123
00:08:03.420 --> 00:08:05.860
Codex always tries to verify its own work.
Codex 总是会尝试验证自己的工作。

124
00:08:06.140 --> 00:08:10.040
So being able to then tap into the build tools and using them.
所以它可以接入构建工具并使用它们。

125
00:08:10.320 --> 00:08:12.900
And that's an amazing part, right?
这正是非常棒的部分，对吧？

126
00:08:12.950 --> 00:08:15.400
So just because just writing code is not enough.
因为只是写代码还不够。

127
00:08:15.450 --> 00:08:20.320
You need to make sure that the code actually works and reiterate on that if it doesn't.
你需要确保代码真的能工作，如果不能，就继续迭代。

128
00:08:20.620 --> 00:08:23.160
And as you can see, some of the commands are skipped.
你可以看到，一些命令被跳过了。

129
00:08:23.240 --> 00:08:24.280
and it's done.
然后它完成了。

130
00:08:24.490 --> 00:08:24.900
You see?
看到了吗？

131
00:08:25.220 --> 00:08:28.840
So the Codex listed the files that were changed, right?
Codex 列出了被修改的文件，对吧？

132
00:08:29.040 --> 00:08:31.960
So we can take a look at the lines
所以我们可以查看这些行，

133
00:08:31.990 --> 00:08:34.539
that were actually updated or removed.
也就是实际被更新或删除的内容。

134
00:08:35.700 --> 00:08:37.520
We can see them in a commit tool window
我们可以在提交工具窗口中看到它们，

135
00:08:37.659 --> 00:08:38.680
that they are uncommitted yet.
这些更改还没有提交。

136
00:08:38.979 --> 00:08:41.740
So we can push them to the repo.
所以我们可以把它们推送到仓库。

137
00:08:42.240 --> 00:08:44.340
But first of all, let's make sure that it actually works
但首先，我们要确认它确实能正常工作，

138
00:08:44.820 --> 00:08:48.700
and rerun the app to see whether the localization
重新运行应用，看看本地化

139
00:08:48.830 --> 00:08:49.420
actually takes place.
是否真的生效了。

140
00:08:49.640 --> 00:08:49.760
Cool.
好。

141
00:08:50.160 --> 00:08:51.699
And for that, we're just using the same tools
为此，我们只是使用同样的工具，

142
00:08:51.720 --> 00:08:53.440
that we're used to in the IDE already.
也就是我们在 IDE 中已经习惯使用的工具。

143
00:08:53.520 --> 00:08:54.380
Exactly, yeah.
没错，是的。

144
00:08:54.900 --> 00:09:00.300
So it's building, starting up the iOS simulator.
所以它正在构建，并启动 iOS 模拟器。

145
00:09:01.200 --> 00:09:05.300
It starts the simulator, and I'd expect the app to be already in Spanish.
它启动了模拟器，我预期应用应该已经是西班牙语了。

146
00:09:05.720 --> 00:09:07.180
Cool. Let's see.
好，我们看看。

147
00:09:07.500 --> 00:09:10.020
Oh, yeah, I can see your simulator is set to Spanish already.
哦，是的，我看到你的模拟器已经设置成西班牙语了。

148
00:09:10.080 --> 00:09:13.880
It's set to Spanish just because the app is going to take the localization from the system.
它设置成西班牙语，是因为应用会从系统获取本地化设置。

149
00:09:14.560 --> 00:09:20.500
So if everything went fine, the app would be already in Spanish.
所以如果一切顺利，应用现在应该已经是西班牙语了。

150
00:09:21.920 --> 00:09:24.620
And that's how Codex is natively integrated in our products.
这就是 Codex 原生集成到我们产品中的方式。

151
00:09:25.040 --> 00:09:31.720
What I showed you was all done in IntelliJ, but it also works in other JetBrains products like PyCharm, WebStorm, or Rider.
我刚才展示的一切都是在 IntelliJ 中完成的，但它也可以在 PyCharm、WebStorm 或 Rider 等其他 JetBrains 产品中使用。

152
00:09:32.400 --> 00:09:32.840
Thanks, Gleb.
谢谢，Gleb。

153
00:09:33.540 --> 00:09:36.740
These are just a few of the things that you can build with Codex inside JetBrains.
这些只是你可以在 JetBrains 中用 Codex 构建的部分内容。

154
00:09:37.240 --> 00:09:44.320
To get started, go to openai.com/codex or choose Codex inside the AI chat of your JetBrains IDE of choice.
要开始使用，请访问 openai.com/codex，或者在你选择的 JetBrains IDE 的 AI chat 中选择 Codex。

155
00:09:44.820 --> 00:09:46.500
Thank you, and we can't wait to see what you build.
谢谢大家，我们迫不及待想看到你们会构建什么。
