Files
langchain-evolution-deck/slides/section4-openswe/13-triggers-overview.js
T
petya 75601988c2 Initial commit: LangChain evolution tutorial deck (132 slides)
- Cover, TOC, 5 dividers, 3 recap slides
- 5 sections (chains, langgraph, deepagents, openswe, ecosystem)
- design-system.js with theme tokens + 9 helper functions
- research/: timeline + sources + per-tech notes
- final-compile.js + merge.js for rebuild pipeline
- output/: langchain-evolution.pptx (2.3 MB) + langchain-evolution.pdf (1.1 MB) + 7 sample previews
2026-06-22 11:29:03 +03:00

120 lines
3.5 KiB
JavaScript

/**
* slides/13-triggers-overview.js
* ----------------------------------------------------------------------------
* Slide 13 -- Triggers: 3 surface overview
* Slack / Linear / GitHub with @open-swe pattern.
*/
'use strict';
const { helpers, layouts } = require('../../design-system');
function buildTriggersOverview(pres, theme) {
const slide = pres.addSlide();
helpers.slideBase(slide, pres, theme);
helpers.addHeader(slide, pres, theme, {
eyebrow: 'STAGE 4',
sectionNumber: 4,
title: 'Triggers overview',
});
// 3 trigger cards
const cardY = layouts.CONTENT_TOP;
const cardH = 3.5;
const cardW = 2.95;
const gap = 0.13;
const triggers = [
{
name: 'Slack',
icon: '@',
desc: 'В любом thread канала. Поддерживает синтаксис repo:owner/name.',
syntax: '@open-swe fix the auth bug\nrepo:acme/api',
color: theme.palette.accent.primary,
},
{
name: 'Linear',
icon: '#',
desc: 'В комментарии к issue. Привязывает thread к Linear-тикету.',
syntax: '@openswe implement the\nacceptance criteria',
color: theme.palette.accent.secondary,
},
{
name: 'GitHub',
icon: 'PR',
desc: 'В PR-комментарии для авто-ответа на review-комментарии.',
syntax: '@openswe address\nthe review comments',
color: theme.palette.accent.tertiary,
},
];
triggers.forEach(function (t, idx) {
const cx = 0.5 + idx * (cardW + gap);
slide.addShape(pres.ShapeType.roundRect, {
x: cx, y: cardY, w: cardW, h: cardH,
fill: { color: theme.palette.bg.elevated },
line: { color: t.color, width: 1.2 },
rectRadius: 0.08,
});
// Icon badge
slide.addShape(pres.ShapeType.roundRect, {
x: cx + 0.2, y: cardY + 0.2, w: 0.55, h: 0.55,
fill: { color: t.color },
line: { color: t.color, width: 1 },
rectRadius: 0.08,
});
slide.addText(t.icon, {
x: cx + 0.2, y: cardY + 0.2, w: 0.55, h: 0.55,
fontFace: helpers.withFallback(theme.fonts.ui),
fontSize: 18,
color: theme.palette.text.inverse,
bold: true,
align: 'center',
valign: 'middle',
});
// Name
slide.addText(t.name, {
x: cx + 0.85, y: cardY + 0.2, w: cardW - 1.0, h: 0.55,
fontFace: helpers.withFallback(theme.fonts.ui),
fontSize: theme.sizes.h3,
color: theme.palette.text.primary,
bold: true,
valign: 'middle',
});
// Desc
slide.addText(t.desc, {
x: cx + 0.2, y: cardY + 0.9, w: cardW - 0.4, h: 1.05,
fontFace: helpers.withFallback(theme.fonts.ui),
fontSize: theme.sizes.body,
color: theme.palette.text.secondary,
valign: 'top',
});
// Syntax code
slide.addShape(pres.ShapeType.roundRect, {
x: cx + 0.2, y: cardY + 2.05, w: cardW - 0.4, h: 1.25,
fill: { color: theme.palette.bg.code },
line: { color: theme.palette.border.subtle, width: 0.5 },
rectRadius: 0.06,
});
slide.addText(t.syntax, {
x: cx + 0.3, y: cardY + 2.1, w: cardW - 0.6, h: 1.15,
fontFace: helpers.withFallback(theme.fonts.code),
fontSize: theme.sizes.code,
color: theme.palette.text.primary,
valign: 'top',
});
});
helpers.addPageNumber(slide, pres, theme, 13);
helpers.addSourceLine(slide, pres, theme, {
source: 'research/per-tech/openswe.md: 90-97',
});
return slide;
}
module.exports = { buildTriggersOverview };